text:
Almost certainly the best Flickr API client in the world for node and the browser

## Install

```
$ npm install flickr-sdk
```

## Usage

flickr-sdk is based on [superagent][] and all methods that make API calls will return a superagent Request instance configured for the request. This means that you can do anything with Flickr requests that you can do with superagent.

The Flickr API is divided into several services:

- The [REST API][services/api] service, which provides access to Flickr data
- The [OAuth][services/oauth] service, which authenticates users via OAuth 1.0
- The [Feeds][services/feeds] service, which provides feeds of public Flickr data
- The [Upload][services/upload] service, where you can upload photos!
- The [Replace][services/replace] service, where you can replace photos you previously uploaded

**Example**

``` js
var Flickr = require('flickr-sdk');
```

### Browser Usage

Since OAuth 1.0 requires your application's key and secret to sign requests, flickr-sdk does not support this authentication method in the browser. Upload, Replace, and REST API calls that require authentication will not work without a valid OAuth signature. You can still use flickr-sdk to call REST API methods that don't require authentication or to get public feeds.

flickr-sdk has been tested with [browserify][] but should work with other client-side module bundlers like [webpack][] and [rollup][]. If you need a standalone browser-ready version of flickr-sdk, each release on [npm](https://www.npmjs.com/package/flickr-sdk) will contain a browserified version of this module at `node_modules/flickr-sdk/flickr-sdk.js`. It is not minified.

## Flickr
All of the [REST API][services/api] methods are available on the
[Flickr](#Flickr) prototype. Each method accepts a single parameter
which is an optional hash of arguments. Refer to the [REST API][services/api]
docs for the full list of methods and their supported arguments.

| Method | Permissions | Required Arguments |
| --- | --- | --- |
| [flickr.activity.userComments](https://www.flickr.com/services/api/flickr.activity.userComments.html) | `read` :eyes: |  |
| [flickr.activity.userPhotos](https://www.flickr.com/services/api/flickr.activity.userPhotos.html) | `read` :eyes: |  |
| [flickr.auth.checkToken](https://www.flickr.com/services/api/flickr.auth.checkToken.html) | `none`  | `auth_token` |
| [flickr.auth.getFrob](https://www.flickr.com/services/api/flickr.auth.getFrob.html) | `none`  |  |
| [flickr.auth.getFullToken](https://www.flickr.com/services/api/flickr.auth.getFullToken.html) | `none`  | `mini_token` |
| [flickr.auth.getToken](https://www.flickr.com/services/api/flickr.auth.getToken.html) | `none`  | `frob` |
| [flickr.auth.oauth.checkToken](https://www.flickr.com/services/api/flickr.auth.oauth.checkToken.html) | `none`  | `oauth_token` |
| [flickr.auth.oauth.getAccessToken](https://www.flickr.com/services/api/flickr.auth.oauth.getAccessToken.html) | `none`  |  |
| [flickr.blogs.getList](https://www.flickr.com/services/api/flickr.blogs.getList.html) | `read` :eyes: |  |
| [flickr.blogs.getServices](https://www.flickr.com/services/api/flickr.blogs.getServices.html) | `none`  |  |
| [flickr.blogs.postPhoto](https://www.flickr.com/services/api/flickr.blogs.postPhoto.html) | `write` :pencil2: | `photo_id`, `title`, `description` |
| [flickr.cameras.getBrandModels](https://www.flickr.com/services/api/flickr.cameras.getBrandModels.html) | `none`  | `brand` |
| [flickr.cameras.getBrands](https://www.flickr.com/services/api/flickr.cameras.getBrands.html) | `none`  |  |
| [flickr.collections.getInfo](https://www.flickr.com/services/api/flickr.collections.getInfo.html) | `read` :eyes: | `collection_id` |
| [flickr.collections.getTree](https://www.flickr.com/services/api/flickr.collections.getTree.html) | `none`  |  |
| [flickr.commons.getInstitutions](https://www.flickr.com/services/api/flickr.commons.getInstitutions.html) | `none`  |  |
| [flickr.contacts.getList](https://www.flickr.com/services/api/flickr.contacts.getList.html) | `read` :eyes: |  |
| [flickr.contacts.getListRecentlyUploaded](https://www.flickr.com/services/api/flickr.contacts.getListRecentlyUploaded.html) | `read` :eyes: |  |
| [flickr.contacts.getPublicList](https://www.flickr.com/services/api/flickr.contacts.getPublicList.html) | `none`  | `user_id` |
| [flickr.contacts.getTaggingSuggestions](https://www.flickr.com/services/api/flickr.contacts.getTaggingSuggestions.html) | `read` :eyes: |  |
| [flickr.favorites.add](https://www.flickr.com/services/api/flickr.favorites.add.html) | `write` :pencil2: | `photo_id` |
| [flickr.favorites.getContext](https://www.flickr.com/services/api/flickr.favorites.getContext.html) | `none`  | `photo_id`, `user_id` |
| [flickr.favorites.getList](https://www.flickr.com/services/api/flickr.favorites.getList.html) | `none`  |  |
| [flickr.favorites.getPublicList](https://www.flickr.com/services/api/flickr.favorites.getPublicList.html) | `none`  | `user_id` |
| [flickr.favorites.remove](https://www.flickr.com/services/api/flickr.favorites.remove.html) | `write` :pencil2: | `photo_id` |
| [flickr.galleries.addPhoto](https://www.flickr.com/services/api/flickr.galleries.addPhoto.html) | `write` :pencil2: | `gallery_id`, `photo_id` |
| [flickr.galleries.create](https://www.flickr.com/services/api/flickr.galleries.create.html) | `write` :pencil2: | `title`, `description` |
| [flickr.galleries.editMeta](https://www.flickr.com/services/api/flickr.galleries.editMeta.html) | `write` :pencil2: | `gallery_id`, `title` |
| [flickr.galleries.editPhoto](https://www.flickr.com/services/api/flickr.galleries.editPhoto.html) | `write` :pencil2: | `gallery_id`, `photo_id`, `comment` |
| [flickr.galleries.editPhotos](https://www.flickr.com/services/api/flickr.galleries.editPhotos.html) | `write` :pencil2: | `gallery_id`, `primary_photo_id`, `photo_ids` |
| [flickr.galleries.getInfo](https://www.flickr.com/services/api/flickr.galleries.getInfo.html) | `none`  | `gallery_id` |
| [flickr.galleries.getList](https://www.flickr.com/services/api/flickr.galleries.getList.html) | `none`  | `user_id` |
| [flickr.galleries.getListForPhoto](https://www.flickr.com/services/api/flickr.galleries.getListForPhoto.html) | `none`  | `photo_id` |
| [flickr.galleries.getPhotos](https://www.flickr.com/services/api/flickr.galleries.getPhotos.html) | `none`  | `gallery_id` |
| [flickr.groups.browse](https://www.flickr.com/services/api/flickr.groups.browse.html) | `read` :eyes: |  |
| [flickr.groups.getInfo](https://www.flickr.com/services/api/flickr.groups.getInfo.html) | `none`  | `group_id` |
| [flickr.groups.join](https://www.flickr.com/services/api/flickr.groups.join.html) | `write` :pencil2: | `group_id` |
| [flickr.groups.joinRequest](https://www.flickr.com/services/api/flickr.groups.joinRequest.html) | `write` :pencil2: | `group_id`, `message`, `accept_rules` |
| [flickr.groups.leave](https://www.flickr.com/services/api/flickr.groups.leave.html) | `delete` :boom: | `group_id` |
| [flickr.groups.search](https://www.flickr.com/services/api/flickr.groups.search.html) | `none`  | `text` |
| [flickr.groups.discuss.replies.add](https://www.flickr.com/services/api/flickr.groups.discuss.replies.add.html) | `write` :pencil2: | `group_id`, `topic_id`, `message` |
| [flickr.groups.discuss.replies.delete](https://www.flickr.com/services/api/flickr.groups.discuss.replies.delete.html) | `delete` :boom: | `group_id`, `topic_id`, `reply_id` |
| [flickr.groups.discuss.replies.edit](https://www.flickr.com/services/api/flickr.groups.discuss.replies.edit.html) | `write` :pencil2: | `group_id`, `topic_id`, `reply_id`, `message` |
| [flickr.groups.discuss.replies.getInfo](https://www.flickr.com/services/api/flickr.groups.discuss.replies.getInfo.html) | `none`  | `group_id`, `topic_id`, `reply_id` |
| [flickr.groups.discuss.replies.getList](https://www.flickr.com/services/api/flickr.groups.discuss.replies.getList.html) | `none`  | `group_id`, `topic_id`, `per_page` |
| [flickr.groups.discuss.topics.add](https://www.flickr.com/services/api/flickr.groups.discuss.topics.add.html) | `write` :pencil2: | `group_id`, `subject`, `message` |
| [flickr.groups.discuss.topics.getInfo](https://www.flickr.com/services/api/flickr.groups.discuss.topics.getInfo.html) | `none`  | `group_id`, `topic_id` |
| [flickr.groups.discuss.topics.getList](https://www.flickr.com/services/api/flickr.groups.discuss.topics.getList.html) | `none`  | `group_id` |
| [flickr.groups.members.getList](https://www.flickr.com/services/api/flickr.groups.members.getList.html) | `read` :eyes: | `group_id` |
| [flickr.groups.pools.add](https://www.flickr.com/services/api/flickr.groups.pools.add.html) | `write` :pencil2: | `photo_id`, `group_id` |
| [flickr.groups.pools.getContext](https://www.flickr.com/services/api/flickr.groups.pools.getContext.html) | `none`  | `photo_id`, `group_id` |
| [flickr.groups.pools.getGroups](https://www.flickr.com/services/api/flickr.groups.pools.getGroups.html) | `read` :eyes: |  |
| [flickr.groups.pools.getPhotos](https://www.flickr.com/services/api/flickr.groups.pools.getPhotos.html) | `none`  | `group_id` |
| [flickr.groups.pools.remove](https://www.flickr.com/services/api/flickr.groups.pools.remove.html) | `write` :pencil2: | `photo_id`, `group_id` |
| [flickr.interestingness.getList](https://www.flickr.com/services/api/flickr.interestingness.getList.html) | `none`  |  |
| [flickr.machinetags.getNamespaces](https://www.flickr.com/services/api/flickr.machinetags.getNamespaces.html) | `none`  |  |
| [flickr.machinetags.getPairs](https://www.flickr.com/services/api/flickr.machinetags.getPairs.html) | `none`  |  |
| [flickr.machinetags.getPredicates](https://www.flickr.com/services/api/flickr.machinetags.getPredicates.html) | `none`  |  |
| [flickr.machinetags.getRecentValues](https://www.flickr.com/services/api/flickr.machinetags.getRecentValues.html) | `none`  |  |
| [flickr.machinetags.getValues](https://www.flickr.com/services/api/flickr.machinetags.getValues.html) | `none`  | `namespace`, `predicate` |
| [flickr.panda.getList](https://www.flickr.com/services/api/flickr.panda.getList.html) | `none`  |  |
| [flickr.panda.getPhotos](https://www.flickr.com/services/api/flickr.panda.getPhotos.html) | `none`  | `panda_name` |
| [flickr.people.findByEmail](https://www.flickr.com/services/api/flickr.people.findByEmail.html) | `none`  | `find_email` |
| [flickr.people.findByUsername](https://www.flickr.com/services/api/flickr.people.findByUsername.html) | `none`  | `username` |
| [flickr.people.getGroups](https://www.flickr.com/services/api/flickr.people.getGroups.html) | `read` :eyes: | `user_id` |
| [flickr.people.getInfo](https://www.flickr.com/services/api/flickr.people.getInfo.html) | `none`  | `user_id` |
| [flickr.people.getLimits](https://www.flickr.com/services/api/flickr.people.getLimits.html) | `read` :eyes: |  |
| [flickr.people.getPhotos](https://www.flickr.com/services/api/flickr.people.getPhotos.html) | `none`  | `user_id` |
| [flickr.people.getPhotosOf](https://www.flickr.com/services/api/flickr.people.getPhotosOf.html) | `none`  | `user_id` |
| [flickr.people.getPublicGroups](https://www.flickr.com/services/api/flickr.people.getPublicGroups.html) | `none`  | `user_id` |
| [flickr.people.getPublicPhotos](https://www.flickr.com/services/api/flickr.people.getPublicPhotos.html) | `none`  | `user_id` |
| [flickr.people.getUploadStatus](https://www.flickr.com/services/api/flickr.people.getUploadStatus.html) | `read` :eyes: |  |
| [flickr.photos.addTags](https://www.flickr.com/services/api/flickr.photos.addTags.html) | `write` :pencil2: | `photo_id`, `tags` |
| [flickr.photos.delete](https://www.flickr.com/services/api/flickr.photos.delete.html) | `delete` :boom: | `photo_id` |
| [flickr.photos.getAllContexts](https://www.flickr.com/services/api/flickr.photos.getAllContexts.html) | `none`  | `photo_id` |
| [flickr.photos.getContactsPhotos](https://www.flickr.com/services/api/flickr.photos.getContactsPhotos.html) | `read` :eyes: |  |
| [flickr.photos.getContactsPublicPhotos](https://www.flickr.com/services/api/flickr.photos.getContactsPublicPhotos.html) | `none`  | `user_id` |
| [flickr.photos.getContext](https://www.flickr.com/services/api/flickr.photos.getContext.html) | `none`  | `photo_id` |
| [flickr.photos.getCounts](https://www.flickr.com/services/api/flickr.photos.getCounts.html) | `read` :eyes: |  |
| [flickr.photos.getExif](https://www.flickr.com/services/api/flickr.photos.getExif.html) | `none`  | `photo_id` |
| [flickr.photos.getFavorites](https://www.flickr.com/services/api/flickr.photos.getFavorites.html) | `none`  | `photo_id` |
| [flickr.photos.getInfo](https://www.flickr.com/services/api/flickr.photos.getInfo.html) | `none`  | `photo_id` |
| [flickr.photos.getNotInSet](https://www.flickr.com/services/api/flickr.photos.getNotInSet.html) | `read` :eyes: |  |
| [flickr.photos.getPerms](https://www.flickr.com/services/api/flickr.photos.getPerms.html) | `read` :eyes: | `photo_id` |
| [flickr.photos.getPopular](https://www.flickr.com/services/api/flickr.photos.getPopular.html) | `none`  |  |
| [flickr.photos.getRecent](https://www.flickr.com/services/api/flickr.photos.getRecent.html) | `none`  |  |
| [flickr.photos.getSizes](https://www.flickr.com/services/api/flickr.photos.getSizes.html) | `none`  | `photo_id` |
| [flickr.photos.getUntagged](https://www.flickr.com/services/api/flickr.photos.getUntagged.html) | `read` :eyes: |  |
| [flickr.photos.getWithGeoData](https://www.flickr.com/services/api/flickr.photos.getWithGeoData.html) | `read` :eyes: |  |
| [flickr.photos.getWithoutGeoData](https://www.flickr.com/services/api/flickr.photos.getWithoutGeoData.html) | `read` :eyes: |  |
| [flickr.photos.recentlyUpdated](https://www.flickr.com/services/api/flickr.photos.recentlyUpdated.html) | `read` :eyes: | `min_date` |
| [flickr.photos.removeTag](https://www.flickr.com/services/api/flickr.photos.removeTag.html) | `write` :pencil2: | `tag_id` |
| [flickr.photos.search](https://www.flickr.com/services/api/flickr.photos.search.html) | `none`  |  |
| [flickr.photos.setContentType](https://www.flickr.com/services/api/flickr.photos.setContentType.html) | `write` :pencil2: | `photo_id`, `content_type` |
| [flickr.photos.setDates](https://www.flickr.com/services/api/flickr.photos.setDates.html) | `write` :pencil2: | `photo_id` |
| [flickr.photos.setMeta](https://www.flickr.com/services/api/flickr.photos.setMeta.html) | `write` :pencil2: | `photo_id` |
| [flickr.photos.setPerms](https://www.flickr.com/services/api/flickr.photos.setPerms.html) | `write` :pencil2: | `photo_id`, `is_public`, `is_friend`, `is_family` |
| [flickr.photos.setSafetyLevel](https://www.flickr.com/services/api/flickr.photos.setSafetyLevel.html) | `write` :pencil2: | `photo_id` |
| [flickr.photos.setTags](https://www.flickr.com/services/api/flickr.photos.setTags.html) | `write` :pencil2: | `photo_id`, `tags` |
| [flickr.photos.comments.addComment](https://www.flickr.com/services/api/flickr.photos.comments.addComment.html) | `write` :pencil2: | `photo_id`, `comment_text` |
| [flickr.photos.comments.deleteComment](https://www.flickr.com/services/api/flickr.photos.comments.deleteComment.html) | `write` :pencil2: | `comment_id` |
| [flickr.photos.comments.editComment](https://www.flickr.com/services/api/flickr.photos.comments.editComment.html) | `write` :pencil2: | `comment_id`, `comment_text` |
| [flickr.photos.comments.getList](https://www.flickr.com/services/api/flickr.photos.comments.getList.html) | `none`  | `photo_id` |
| [flickr.photos.comments.getRecentForContacts](https://www.flickr.com/services/api/flickr.photos.comments.getRecentForContacts.html) | `read` :eyes: |  |
| [flickr.photos.geo.batchCorrectLocation](https://www.flickr.com/services/api/flickr.photos.geo.batchCorrectLocation.html) | `write` :pencil2: | `lat`, `lon`, `accuracy` |
| [flickr.photos.geo.correctLocation](https://www.flickr.com/services/api/flickr.photos.geo.correctLocation.html) | `write` :pencil2: | `photo_id`, `foursquare_id` |
| [flickr.photos.geo.getLocation](https://www.flickr.com/services/api/flickr.photos.geo.getLocation.html) | `none`  | `photo_id` |
| [flickr.photos.geo.getPerms](https://www.flickr.com/services/api/flickr.photos.geo.getPerms.html) | `read` :eyes: | `photo_id` |
| [flickr.photos.geo.photosForLocation](https://www.flickr.com/services/api/flickr.photos.geo.photosForLocation.html) | `read` :eyes: | `lat`, `lon` |
| [flickr.photos.geo.removeLocation](https://www.flickr.com/services/api/flickr.photos.geo.removeLocation.html) | `write` :pencil2: | `photo_id` |
| [flickr.photos.geo.setContext](https://www.flickr.com/services/api/flickr.photos.geo.setContext.html) | `write` :pencil2: | `photo_id`, `context` |
| [flickr.photos.geo.setLocation](https://www.flickr.com/services/api/flickr.photos.geo.setLocation.html) | `write` :pencil2: | `photo_id`, `lat`, `lon` |
| [flickr.photos.geo.setPerms](https://www.flickr.com/services/api/flickr.photos.geo.setPerms.html) | `write` :pencil2: | `is_public`, `is_contact`, `is_friend`, `is_family`, `photo_id` |
| [flickr.photos.licenses.getInfo](https://www.flickr.com/services/api/flickr.photos.licenses.getInfo.html) | `none`  |  |
| [flickr.photos.licenses.setLicense](https://www.flickr.com/services/api/flickr.photos.licenses.setLicense.html) | `write` :pencil2: | `photo_id`, `license_id` |
| [flickr.photos.notes.add](https://www.flickr.com/services/api/flickr.photos.notes.add.html) | `write` :pencil2: | `photo_id`, `note_x`, `note_y`, `note_w`, `note_h`, `note_text` |
| [flickr.photos.notes.delete](https://www.flickr.com/services/api/flickr.photos.notes.delete.html) | `write` :pencil2: | `note_id` |
| [flickr.photos.notes.edit](https://www.flickr.com/services/api/flickr.photos.notes.edit.html) | `write` :pencil2: | `note_id`, `note_x`, `note_y`, `note_w`, `note_h`, `note_text` |
| [flickr.photos.people.add](https://www.flickr.com/services/api/flickr.photos.people.add.html) | `write` :pencil2: | `photo_id`, `user_id` |
| [flickr.photos.people.delete](https://www.flickr.com/services/api/flickr.photos.people.delete.html) | `write` :pencil2: | `photo_id`, `user_id` |
| [flickr.photos.people.deleteCoords](https://www.flickr.com/services/api/flickr.photos.people.deleteCoords.html) | `write` :pencil2: | `photo_id`, `user_id` |
| [flickr.photos.people.editCoords](https://www.flickr.com/services/api/flickr.photos.people.editCoords.html) | `write` :pencil2: | `photo_id`, `user_id`, `person_x`, `person_y`, `person_w`, `person_h` |
| [flickr.photos.people.getList](https://www.flickr.com/services/api/flickr.photos.people.getList.html) | `none`  | `photo_id` |
| [flickr.photos.suggestions.approveSuggestion](https://www.flickr.com/services/api/flickr.photos.suggestions.approveSuggestion.html) | `write` :pencil2: | `suggestion_id` |
| [flickr.photos.suggestions.getList](https://www.flickr.com/services/api/flickr.photos.suggestions.getList.html) | `read` :eyes: |  |
| [flickr.photos.suggestions.rejectSuggestion](https://www.flickr.com/services/api/flickr.photos.suggestions.rejectSuggestion.html) | `write` :pencil2: | `suggestion_id` |
| [flickr.photos.suggestions.removeSuggestion](https://www.flickr.com/services/api/flickr.photos.suggestions.removeSuggestion.html) | `write` :pencil2: | `suggestion_id` |
| [flickr.photos.suggestions.suggestLocation](https://www.flickr.com/services/api/flickr.photos.suggestions.suggestLocation.html) | `write` :pencil2: | `photo_id`, `lat`, `lon` |
| [flickr.photos.transform.rotate](https://www.flickr.com/services/api/flickr.photos.transform.rotate.html) | `write` :pencil2: | `photo_id`, `degrees` |
| [flickr.photos.upload.checkTickets](https://www.flickr.com/services/api/flickr.photos.upload.checkTickets.html) | `none`  | `tickets` |
| [flickr.photosets.addPhoto](https://www.flickr.com/services/api/flickr.photosets.addPhoto.html) | `write` :pencil2: | `photoset_id`, `photo_id` |
| [flickr.photosets.create](https://www.flickr.com/services/api/flickr.photosets.create.html) | `write` :pencil2: | `title`, `primary_photo_id` |
| [flickr.photosets.delete](https://www.flickr.com/services/api/flickr.photosets.delete.html) | `write` :pencil2: | `photoset_id` |
| [flickr.photosets.editMeta](https://www.flickr.com/services/api/flickr.photosets.editMeta.html) | `write` :pencil2: | `photoset_id`, `title` |
| [flickr.photosets.editPhotos](https://www.flickr.com/services/api/flickr.photosets.editPhotos.html) | `write` :pencil2: | `photoset_id`, `primary_photo_id`, `photo_ids` |
| [flickr.photosets.getContext](https://www.flickr.com/services/api/flickr.photosets.getContext.html) | `none`  | `photo_id`, `photoset_id` |
| [flickr.photosets.getInfo](https://www.flickr.com/services/api/flickr.photosets.getInfo.html) | `none`  | `photoset_id`, `user_id` |
| [flickr.photosets.getList](https://www.flickr.com/services/api/flickr.photosets.getList.html) | `none`  |  |
| [flickr.photosets.getPhotos](https://www.flickr.com/services/api/flickr.photosets.getPhotos.html) | `none`  | `photoset_id`, `user_id` |
| [flickr.photosets.orderSets](https://www.flickr.com/services/api/flickr.photosets.orderSets.html) | `write` :pencil2: | `photoset_ids` |
| [flickr.photosets.removePhoto](https://www.flickr.com/services/api/flickr.photosets.removePhoto.html) | `write` :pencil2: | `photoset_id`, `photo_id` |
| [flickr.photosets.removePhotos](https://www.flickr.com/services/api/flickr.photosets.removePhotos.html) | `write` :pencil2: | `photoset_id`, `photo_ids` |
| [flickr.photosets.reorderPhotos](https://www.flickr.com/services/api/flickr.photosets.reorderPhotos.html) | `write` :pencil2: | `photoset_id`, `photo_ids` |
| [flickr.photosets.setPrimaryPhoto](https://www.flickr.com/services/api/flickr.photosets.setPrimaryPhoto.html) | `write` :pencil2: | `photoset_id`, `photo_id` |
| [flickr.photosets.comments.addComment](https://www.flickr.com/services/api/flickr.photosets.comments.addComment.html) | `write` :pencil2: | `photoset_id`, `comment_text` |
| [flickr.photosets.comments.deleteComment](https://www.flickr.com/services/api/flickr.photosets.comments.deleteComment.html) | `write` :pencil2: | `comment_id` |
| [flickr.photosets.comments.editComment](https://www.flickr.com/services/api/flickr.photosets.comments.editComment.html) | `write` :pencil2: | `comment_id`, `comment_text` |
| [flickr.photosets.comments.getList](https://www.flickr.com/services/api/flickr.photosets.comments.getList.html) | `none`  | `photoset_id` |
| [flickr.places.find](https://www.flickr.com/services/api/flickr.places.find.html) | `none`  | `query` |
| [flickr.places.findByLatLon](https://www.flickr.com/services/api/flickr.places.findByLatLon.html) | `none`  | `lat`, `lon` |
| [flickr.places.getChildrenWithPhotosPublic](https://www.flickr.com/services/api/flickr.places.getChildrenWithPhotosPublic.html) | `none`  |  |
| [flickr.places.getInfo](https://www.flickr.com/services/api/flickr.places.getInfo.html) | `none`  |  |
| [flickr.places.getInfoByUrl](https://www.flickr.com/services/api/flickr.places.getInfoByUrl.html) | `none`  | `url` |
| [flickr.places.getPlaceTypes](https://www.flickr.com/services/api/flickr.places.getPlaceTypes.html) | `none`  |  |
| [flickr.places.getShapeHistory](https://www.flickr.com/services/api/flickr.places.getShapeHistory.html) | `none`  |  |
| [flickr.places.getTopPlacesList](https://www.flickr.com/services/api/flickr.places.getTopPlacesList.html) | `none`  | `place_type_id` |
| [flickr.places.placesForBoundingBox](https://www.flickr.com/services/api/flickr.places.placesForBoundingBox.html) | `none`  | `bbox` |
| [flickr.places.placesForContacts](https://www.flickr.com/services/api/flickr.places.placesForContacts.html) | `read` :eyes: |  |
| [flickr.places.placesForTags](https://www.flickr.com/services/api/flickr.places.placesForTags.html) | `none`  | `place_type_id` |
| [flickr.places.placesForUser](https://www.flickr.com/services/api/flickr.places.placesForUser.html) | `read` :eyes: |  |
| [flickr.places.resolvePlaceId](https://www.flickr.com/services/api/flickr.places.resolvePlaceId.html) | `none`  | `place_id` |
| [flickr.places.resolvePlaceURL](https://www.flickr.com/services/api/flickr.places.resolvePlaceURL.html) | `none`  | `url` |
| [flickr.places.tagsForPlace](https://www.flickr.com/services/api/flickr.places.tagsForPlace.html) | `none`  |  |
| [flickr.prefs.getContentType](https://www.flickr.com/services/api/flickr.prefs.getContentType.html) | `read` :eyes: |  |
| [flickr.prefs.getGeoPerms](https://www.flickr.com/services/api/flickr.prefs.getGeoPerms.html) | `read` :eyes: |  |
| [flickr.prefs.getHidden](https://www.flickr.com/services/api/flickr.prefs.getHidden.html) | `read` :eyes: |  |
| [flickr.prefs.getPrivacy](https://www.flickr.com/services/api/flickr.prefs.getPrivacy.html) | `read` :eyes: |  |
| [flickr.prefs.getSafetyLevel](https://www.flickr.com/services/api/flickr.prefs.getSafetyLevel.html) | `read` :eyes: |  |
| [flickr.profile.getProfile](https://www.flickr.com/services/api/flickr.profile.getProfile.html) | `none`  | `user_id` |
| [flickr.push.getSubscriptions](https://www.flickr.com/services/api/flickr.push.getSubscriptions.html) | `read` :eyes: |  |
| [flickr.push.getTopics](https://www.flickr.com/services/api/flickr.push.getTopics.html) | `none`  |  |
| [flickr.push.subscribe](https://www.flickr.com/services/api/flickr.push.subscribe.html) | `read` :eyes: | `topic`, `callback`, `verify` |
| [flickr.push.unsubscribe](https://www.flickr.com/services/api/flickr.push.unsubscribe.html) | `read` :eyes: | `topic`, `callback`, `verify` |
| [flickr.reflection.getMethodInfo](https://www.flickr.com/services/api/flickr.reflection.getMethodInfo.html) | `none`  | `method_name` |
| [flickr.reflection.getMethods](https://www.flickr.com/services/api/flickr.reflection.getMethods.html) | `none`  |  |
| [flickr.stats.getCSVFiles](https://www.flickr.com/services/api/flickr.stats.getCSVFiles.html) | `read` :eyes: |  |
| [flickr.stats.getCollectionDomains](https://www.flickr.com/services/api/flickr.stats.getCollectionDomains.html) | `read` :eyes: | `date` |
| [flickr.stats.getCollectionReferrers](https://www.flickr.com/services/api/flickr.stats.getCollectionReferrers.html) | `read` :eyes: | `date`, `domain` |
| [flickr.stats.getCollectionStats](https://www.flickr.com/services/api/flickr.stats.getCollectionStats.html) | `read` :eyes: | `date`, `collection_id` |
| [flickr.stats.getPhotoDomains](https://www.flickr.com/services/api/flickr.stats.getPhotoDomains.html) | `read` :eyes: | `date` |
| [flickr.stats.getPhotoReferrers](https://www.flickr.com/services/api/flickr.stats.getPhotoReferrers.html) | `read` :eyes: | `date`, `domain` |
| [flickr.stats.getPhotoStats](https://www.flickr.com/services/api/flickr.stats.getPhotoStats.html) | `read` :eyes: | `date`, `photo_id` |
| [flickr.stats.getPhotosetDomains](https://www.flickr.com/services/api/flickr.stats.getPhotosetDomains.html) | `read` :eyes: | `date` |
| [flickr.stats.getPhotosetReferrers](https://www.flickr.com/services/api/flickr.stats.getPhotosetReferrers.html) | `read` :eyes: | `date`, `domain` |
| [flickr.stats.getPhotosetStats](https://www.flickr.com/services/api/flickr.stats.getPhotosetStats.html) | `read` :eyes: | `date`, `photoset_id` |
| [flickr.stats.getPhotostreamDomains](https://www.flickr.com/services/api/flickr.stats.getPhotostreamDomains.html) | `read` :eyes: | `date` |
| [flickr.stats.getPhotostreamReferrers](https://www.flickr.com/services/api/flickr.stats.getPhotostreamReferrers.html) | `read` :eyes: | `date`, `domain` |
| [flickr.stats.getPhotostreamStats](https://www.flickr.com/services/api/flickr.stats.getPhotostreamStats.html) | `read` :eyes: | `date` |
| [flickr.stats.getPopularPhotos](https://www.flickr.com/services/api/flickr.stats.getPopularPhotos.html) | `read` :eyes: |  |
| [flickr.stats.getTotalViews](https://www.flickr.com/services/api/flickr.stats.getTotalViews.html) | `read` :eyes: |  |
| [flickr.tags.getClusterPhotos](https://www.flickr.com/services/api/flickr.tags.getClusterPhotos.html) | `none`  | `tag`, `cluster_id` |
| [flickr.tags.getClusters](https://www.flickr.com/services/api/flickr.tags.getClusters.html) | `none`  | `tag` |
| [flickr.tags.getHotList](https://www.flickr.com/services/api/flickr.tags.getHotList.html) | `none`  |  |
| [flickr.tags.getListPhoto](https://www.flickr.com/services/api/flickr.tags.getListPhoto.html) | `none`  | `photo_id` |
| [flickr.tags.getListUser](https://www.flickr.com/services/api/flickr.tags.getListUser.html) | `none`  |  |
| [flickr.tags.getListUserPopular](https://www.flickr.com/services/api/flickr.tags.getListUserPopular.html) | `none`  |  |
| [flickr.tags.getListUserRaw](https://www.flickr.com/services/api/flickr.tags.getListUserRaw.html) | `none`  |  |
| [flickr.tags.getMostFrequentlyUsed](https://www.flickr.com/services/api/flickr.tags.getMostFrequentlyUsed.html) | `read` :eyes: |  |
| [flickr.tags.getRelated](https://www.flickr.com/services/api/flickr.tags.getRelated.html) | `none`  | `tag` |
| [flickr.test.echo](https://www.flickr.com/services/api/flickr.test.echo.html) | `none`  |  |
| [flickr.test.login](https://www.flickr.com/services/api/flickr.test.login.html) | `read` :eyes: |  |
| [flickr.test.null](https://www.flickr.com/services/api/flickr.test.null.html) | `read` :eyes: |  |
| [flickr.testimonials.addTestimonial](https://www.flickr.com/services/api/flickr.testimonials.addTestimonial.html) | `write` :pencil2: | `user_id`, `testimonial_text` |
| [flickr.testimonials.approveTestimonial](https://www.flickr.com/services/api/flickr.testimonials.approveTestimonial.html) | `write` :pencil2: | `testimonial_id` |
| [flickr.testimonials.deleteTestimonial](https://www.flickr.com/services/api/flickr.testimonials.deleteTestimonial.html) | `write` :pencil2: | `testimonial_id` |
| [flickr.testimonials.editTestimonial](https://www.flickr.com/services/api/flickr.testimonials.editTestimonial.html) | `write` :pencil2: | `user_id`, `testimonial_id`, `testimonial_text` |
| [flickr.testimonials.getAllTestimonialsAbout](https://www.flickr.com/services/api/flickr.testimonials.getAllTestimonialsAbout.html) | `read` :eyes: |  |
| [flickr.testimonials.getAllTestimonialsAboutBy](https://www.flickr.com/services/api/flickr.testimonials.getAllTestimonialsAboutBy.html) | `read` :eyes: | `user_id` |
| [flickr.testimonials.getAllTestimonialsBy](https://www.flickr.com/services/api/flickr.testimonials.getAllTestimonialsBy.html) | `read` :eyes: |  |
| [flickr.testimonials.getPendingTestimonialsAbout](https://www.flickr.com/services/api/flickr.testimonials.getPendingTestimonialsAbout.html) | `read` :eyes: |  |
| [flickr.testimonials.getPendingTestimonialsAboutBy](https://www.flickr.com/services/api/flickr.testimonials.getPendingTestimonialsAboutBy.html) | `read` :eyes: | `user_id` |
| [flickr.testimonials.getPendingTestimonialsBy](https://www.flickr.com/services/api/flickr.testimonials.getPendingTestimonialsBy.html) | `read` :eyes: |  |
| [flickr.testimonials.getTestimonialsAbout](https://www.flickr.com/services/api/flickr.testimonials.getTestimonialsAbout.html) | `none`  | `user_id` |
| [flickr.testimonials.getTestimonialsAboutBy](https://www.flickr.com/services/api/flickr.testimonials.getTestimonialsAboutBy.html) | `read` :eyes: | `user_id` |
| [flickr.testimonials.getTestimonialsBy](https://www.flickr.com/services/api/flickr.testimonials.getTestimonialsBy.html) | `none`  | `user_id` |
| [flickr.urls.getGroup](https://www.flickr.com/services/api/flickr.urls.getGroup.html) | `none`  | `group_id` |
| [flickr.urls.getUserPhotos](https://www.flickr.com/services/api/flickr.urls.getUserPhotos.html) | `none`  |  |
| [flickr.urls.getUserProfile](https://www.flickr.com/services/api/flickr.urls.getUserProfile.html) | `none`  |  |
| [flickr.urls.lookupGallery](https://www.flickr.com/services/api/flickr.urls.lookupGallery.html) | `none`  | `url` |
| [flickr.urls.lookupGroup](https://www.flickr.com/services/api/flickr.urls.lookupGroup.html) | `none`  | `url` |
| [flickr.urls.lookupUser](https://www.flickr.com/services/api/flickr.urls.lookupUser.html) | `none`  | `url` |

**Kind**: global class

* [Flickr](#Flickr)
    * [new Flickr(auth)](#new_Flickr_new)
    * [.OAuth](#Flickr.OAuth)
        * [new OAuth(consumerKey, consumerSecret)](#new_Flickr.OAuth_new)
        * _instance_
            * [.request(oauthCallback)](#Flickr.OAuth+request) ⇒ Request
            * [.authorizeUrl(requestToken, [perms])](#Flickr.OAuth+authorizeUrl) ⇒ String
            * [.verify(oauthToken, oauthVerifier, tokenSecret)](#Flickr.OAuth+verify) ⇒ Request
            * [.plugin(oauthToken, oauthTokenSecret)](#Flickr.OAuth+plugin) ⇒ function
        * _static_
            * [.createPlugin(consumerKey, consumerSecret, oauthToken, oauthTokenSecret)](#Flickr.OAuth.createPlugin) ⇒ function
    * [.Upload](#Flickr.Upload) ⇐ Request
        * [new Upload(auth, file, [args])](#new_Flickr.Upload_new)
    * [.Replace](#Flickr.Replace) ⇐ Request
        * [new Replace(auth, photoID, file, [args])](#new_Flickr.Replace_new)
    * [.Feeds](#Flickr.Feeds)
        * [new Feeds([args])](#new_Flickr.Feeds_new)
        * [.publicPhotos([args])](#Flickr.Feeds+publicPhotos) ⇒ Request
        * [.friendsPhotos(args)](#Flickr.Feeds+friendsPhotos) ⇒ Request
        * [.favePhotos(args)](#Flickr.Feeds+favePhotos) ⇒ Request
        * [.groupDiscussions(args)](#Flickr.Feeds+groupDiscussions) ⇒ Request
        * [.groupPool(args)](#Flickr.Feeds+groupPool) ⇒ Request
        * [.forum([args])](#Flickr.Feeds+forum) ⇒ Request
        * [.recentComments(args)](#Flickr.Feeds+recentComments) ⇒ Request

### new Flickr(auth)
Creates a new Flickr REST API client.

You **must** pass a superagent plugin or your API key as the first
parameter. For methods that don't require authentication, you can simply
provide your API key. For methods that do require authentication,
use the [OAuth plugin](#Flickr.OAuth.createPlugin).

| Param | Type | Description |
| --- | --- | --- |
| auth | function \| String | An authentication plugin function or an API key |

**Example** *(Get info about a public photo with your API key)*
```js

var flickr = new Flickr(process.env.FLICKR_API_KEY);

flickr.photos.getInfo({
  photo_id: 25825763 // sorry, @dokas
}).then(function (res) {
  console.log('yay!', res.body);
}).catch(function (err) {
  console.error('bonk', err);
});
```
**Example** *(Searching for public photos with your API key)*
```js

var flickr = new Flickr(process.env.FLICKR_API_KEY);

flickr.photos.search({
  text: 'doggo'
}).then(function (res) {
  console.log('yay!', res.body);
}).catch(function (err) {
  console.error('bonk', err);
});
```
**Example** *(Authenticate as a user with the OAuth plugin)*
```js

var flickr = new Flickr(Flickr.OAuth.createPlugin(
  process.env.FLICKR_CONSUMER_KEY,
  process.env.FLICKR_CONSUMER_SECRET,
  process.env.FLICKR_OAUTH_TOKEN,
  process.env.FLICKR_OAUTH_TOKEN_SECRET
));

flickr.test.login().then(function (res) {
  console.log('yay!', res.body);
}).catch(function (err) {
  console.error('bonk', err);
});
```

### Flickr.OAuth
**Kind**: static class of [Flickr](#Flickr)

* [.OAuth](#Flickr.OAuth)
    * [new OAuth(consumerKey, consumerSecret)](#new_Flickr.OAuth_new)
    * _instance_
        * [.request(oauthCallback)](#Flickr.OAuth+request) ⇒ Request
        * [.authorizeUrl(requestToken, [perms])](#Flickr.OAuth+authorizeUrl) ⇒ String
        * [.verify(oauthToken, oauthVerifier, tokenSecret)](#Flickr.OAuth+verify) ⇒ Request
        * [.plugin(oauthToken, oauthTokenSecret)](#Flickr.OAuth+plugin) ⇒ function
    * _static_
        * [.createPlugin(consumerKey, consumerSecret, oauthToken, oauthTokenSecret)](#Flickr.OAuth.createPlugin) ⇒ function

#### new OAuth(consumerKey, consumerSecret)
Creates a new OAuth service instance. You can use this service to
request and validate OAuth tokens, as well as generate an auth
plugin suitable for use with the REST and Upload services.

You need to [register an application](https://www.flickr.com/services/apps/create/)
to obtain your `consumerKey` and `consumerSecret`.

> **OAuth 1.0 requires your consumer secret to sign calls,
> and you should never expose secrets to the browser.**

| Param | Type | Description |
| --- | --- | --- |
| consumerKey | String | The application's API key |
| consumerSecret | String | The application's API secret |

**Example**
```js
var oauth = new Flickr.OAuth(
  process.env.FLICKR_CONSUMER_KEY,
  process.env.FLICKR_CONSUMER_SECRET
);
```

#### oAuth.request(oauthCallback) ⇒ Request
Get a Request Token using the consumer key.

**Kind**: instance method of [OAuth](#Flickr.OAuth)
**See**

- https://github.com/visionmedia/superagent
- https://www.flickr.com/services/api/auth.oauth.html#request_token

| Param | Type | Description |
| --- | --- | --- |
| oauthCallback | String | Your application's OAuth callback URL |

**Example**
```js
oauth.request('http://localhost:3000/oauth/callback').then(function (res) {
  console.log('yay!', res);
}).catch(function (err) {
  console.error('bonk', err);
});
```

#### oAuth.authorizeUrl(requestToken, [perms]) ⇒ String
Returns the authorization url for `requestToken`. You may also pass
the `perms` your app is requesting as `read` (the default), `write`,
or `delete`. Your application should redirect the user here to ask
them to verify your request token.

**Kind**: instance method of [OAuth](#Flickr.OAuth)
**See**: https://www.flickr.com/services/api/auth.oauth.html#authorization

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| requestToken | String |  | The OAuth request token |
| [perms] | String | read | Permission level, may be "read", "write" or "delete" |

**Example**
```js
var url = oauth.authorizeUrl(requestToken); // "https://www.flickr.com/services/oauth..."

res.setHeader("Location", url);
res.statusCode = 302;
res.end();
```

#### oAuth.verify(oauthToken, oauthVerifier, tokenSecret) ⇒ Request
Verify an OAuth token using the verifier and token secret. If your user
has indeed verified your request token, you will receive an OAuth token
and secret back, as well as some very basic profile information. You
can now use this token and secret to make calls to the REST API.

**Kind**: instance method of [OAuth](#Flickr.OAuth)
**See**

- https://github.com/visionmedia/superagent
- https://www.flickr.com/services/api/auth.oauth.html#access_token

| Param | Type | Description |
| --- | --- | --- |
| oauthToken | String | The OAuth token to verify |
| oauthVerifier | String | The OAuth token verifier string you received from the callback |
| tokenSecret | String | The OAuth token secret |

**Example**
```js
oauth.verify(oauthToken, oauthVerifier, tokenSecret).then(function (res) {
  console.log('oauth token:', res.body.oauth_token);
  console.log('oauth token secret:', res.body.oauth_token_secret);
}).catch(function (err) {
 console.log('bonk', err);
});
```

#### oAuth.plugin(oauthToken, oauthTokenSecret) ⇒ function
Returns an oauth plugin for this consumer key and secret.

**Kind**: instance method of [OAuth](#Flickr.OAuth)

| Param | Type | Description |
| --- | --- | --- |
| oauthToken | String | The OAuth token |
| oauthTokenSecret | String | The OAuth token secret |

**Example**
```js
var flickr = new Flickr(oauth.plugin(
  oauthToken,
  oauthTokenSecret
));
```

#### OAuth.createPlugin(consumerKey, consumerSecret, oauthToken, oauthTokenSecret) ⇒ function
Returns an oauth plugin for this consumer key, consumer secret,
oauth token and oauth token secret,

**Kind**: static method of [OAuth](#Flickr.OAuth)

| Param | Type | Description |
| --- | --- | --- |
| consumerKey | String | The application's API key |
| consumerSecret | String | The application's API secret |
| oauthToken | String | The OAuth token |
| oauthTokenSecret | String | The OAuth token secret |

**Example**
```js
var flickr = new Flickr(Flickr.OAuth.createPlugin(
  process.env.FLICKR_CONSUMER_KEY,
  process.env.FLICKR_CONSUMER_SECRET,
  process.env.FLICKR_OAUTH_TOKEN,
  process.env.FLICKR_OAUTH_TOKEN_SECRET
));
```

### Flickr.Upload ⇐ Request
**Kind**: static class of [Flickr](#Flickr)
**Extends**: Request
**See**: https://www.flickr.com/services/api/upload.api.html

#### new Upload(auth, file, [args])
Creates a new Upload service instance. Since the Upload API only
does one thing (upload files), an Upload instance is simply
a Request subclass.

The Upload endpoint requires authentication. You should pass a configured
instance of the [OAuth plugin](#Flickr.OAuth.createPlugin) to upload
photos on behalf of another user.

| Param | Type |
| --- | --- |
| auth | function |
| file | String \| fs.ReadStream \| Buffer |
| [args] | Object |

**Example**
```js
var upload = new Flickr.Upload(auth, 'upload.png', {
  title: 'Works on MY machine!'
});

upload.then(function (res) {
  console.log('yay!', res.body);
}).catch(function (err) {
  console.error('bonk', err);
});
```

### Flickr.Replace ⇐ Request
**Kind**: static class of [Flickr](#Flickr)
**Extends**: Request
**See**: https://www.flickr.com/services/api/replace.api.html

#### new Replace(auth, photoID, file, [args])
Creates a new Replace service instance. Since the Replace API only
does one thing (replace files), an Replace instance is simply
a Request subclass.

The Replace endpoint requires authentication. You should pass a configured
instance of the [OAuth plugin](#Flickr.OAuth.createPlugin) to replace
photos on behalf of another user.

| Param | Type | Description |
| --- | --- | --- |
| auth | function |  |
| photoID | Number \| String | The ID of the photo to replace |
| file | String \| fs.ReadStream \| Buffer |  |
| [args] | Object |  |

**Example**
```js
var replace = new Flickr.Replace(auth, 41234567890, 'replace.png', {
  title: 'Now in pink!'
});

replace.then(function (res) {
  console.log('yay!', res.body);
}).catch(function (err) {
  console.error('bonk', err);
});
```

### Flickr.Feeds
**Kind**: static class of [Flickr](#Flickr)

* [.Feeds](#Flickr.Feeds)
    * [new Feeds([args])](#new_Flickr.Feeds_new)
    * [.publicPhotos([args])](#Flickr.Feeds+publicPhotos) ⇒ Request
    * [.friendsPhotos(args)](#Flickr.Feeds+friendsPhotos) ⇒ Request
    * [.favePhotos(args)](#Flickr.Feeds+favePhotos) ⇒ Request
    * [.groupDiscussions(args)](#Flickr.Feeds+groupDiscussions) ⇒ Request
    * [.groupPool(args)](#Flickr.Feeds+groupPool) ⇒ Request
    * [.forum([args])](#Flickr.Feeds+forum) ⇒ Request
    * [.recentComments(args)](#Flickr.Feeds+recentComments) ⇒ Request

#### new Feeds([args])
Creates a new Feeds service instance. You can use this instance
to explore and retrieve public Flickr API data.

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| [args] | Object |  | Arguments that will be passed along with every feed request |
| [args.format] | String | json | The feed response format |
| [args.lang] | String | en-us | The language to request for the feed |

**Example**
```js
var feeds = new Flickr.Feeds();
```

#### feeds.publicPhotos([args]) ⇒ Request
Returns a list of public content matching some criteria.

**Kind**: instance method of [Feeds](#Flickr.Feeds)
**See**: https://www.flickr.com/services/feeds/docs/photos_public/

| Param | Type |
| --- | --- |
| [args] | Object |

#### feeds.friendsPhotos(args) ⇒ Request
Returns a list of public content from the contacts, friends & family of a given person.

**Kind**: instance method of [Feeds](#Flickr.Feeds)
**See**: https://www.flickr.com/services/feeds/docs/photos_friends/

| Param | Type | Description |
| --- | --- | --- |
| args | Object |  |
| args.user_id | Number \| String | The user ID of the user to fetch friends' photos and videos for. |

#### feeds.favePhotos(args) ⇒ Request
Returns a list of public favorites for a given user.

**Kind**: instance method of [Feeds](#Flickr.Feeds)
**See**: https://www.flickr.com/services/feeds/docs/photos_faves/

| Param | Type | Description |
| --- | --- | --- |
| args | Object |  |
| args.id | Number \| String | A single user ID. This specifies a user to fetch for. |

#### feeds.groupDiscussions(args) ⇒ Request
Returns a list of recent discussions in a given group.

**Kind**: instance method of [Feeds](#Flickr.Feeds)
**See**: https://www.flickr.com/services/feeds/docs/groups_discuss/

| Param | Type | Description |
| --- | --- | --- |
| args | Object |  |
| args.id | Number | The ID of the group to fetch discussions for. |

#### feeds.groupPool(args) ⇒ Request
Returns a list of things recently added to the pool of a given group.

**Kind**: instance method of [Feeds](#Flickr.Feeds)
**See**: https://www.flickr.com/services/feeds/docs/groups_pool/

| Param | Type | Description |
| --- | --- | --- |
| args | Object |  |
| args.id | Number | The ID of the group to fetch for. |

#### feeds.forum([args]) ⇒ Request
Returns a list of recent topics from the forum.

**Kind**: instance method of [Feeds](#Flickr.Feeds)
**See**: https://www.flickr.com/services/feeds/docs/forums/

| Param | Type |
| --- | --- |
| [args] | Object |

#### feeds.recentComments(args) ⇒ Request
Returns a list of recent comments that have been commented on by a given person.

**Kind**: instance method of [Feeds](#Flickr.Feeds)
**See**: https://www.flickr.com/services/feeds/docs/photos_comments/

| Param | Type | Description |
| --- | --- | --- |
| args | Object |  |
| args.user_id | Number \| String | The user ID to fetch recent comments for. |

## License

Code licensed under the MIT license. See LICENSE file for terms.

[api keys]: https://www.flickr.com/services/api/misc.api_keys.html
[services/api]: https://www.flickr.com/services/api/
[services/oauth]: https://www.flickr.com/services/api/auth.oauth.html
[services/feeds]: https://www.flickr.com/services/feeds/
[services/upload]: https://www.flickr.com/services/api/upload.api.html
[services/replace]: https://www.flickr.com/services/api/replace.api.html
[flickr.photos.getInfo]: https://www.flickr.com/services/api/flickr.photos.getInfo.html
[flickr.photos.search]: https://www.flickr.com/services/api/flickr.photos.search.html
[superagent]: https://github.com/visionmedia/superagent/
[browserify]: http://browserify.org/
[webpack]: https://webpack.js.org/
[rollup]: https://rollupjs.org/


text:
@interface TodayViewController () <NCWidgetProviding,FSCalendarDataSource,FSCalendarDelegate,FSCalendarDelegateAppearance>

@property (weak  , nonatomic) IBOutlet FSCalendar *calendar;
@property (weak  , nonatomic) IBOutlet UIButton *prevButton;
@property (weak  , nonatomic) IBOutlet UIButton *nextButton;
@property (weak  , nonatomic) IBOutlet NSLayoutConstraint *calendarHeight;

@property (strong, nonatomic) NSCalendar *gregorian;
@property (strong, nonatomic) NSCalendar *lunarCalendar;
@property (strong, nonatomic) NSArray<NSString *> *lunarChars;

@end

@implementation TodayViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.calendar.today = nil;
    self.calendar.locale = [NSLocale localeWithLocaleIdentifier:@"zh-CN"];
    self.calendar.adjustsBoundingRectWhenChangingMonths = NO;
    self.calendar.placeholderType = FSCalendarPlaceholderTypeNone;
    self.calendar.appearance.headerMinimumDissolvedAlpha = 0;
    self.lunarCalendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierChinese];
    self.lunarCalendar.locale = [NSLocale localeWithLocaleIdentifier:@"zh-CN"];
    self.lunarChars = @[@"初一",@"初二",@"初三",@"初四",@"初五",@"初六",@"初七",@"初八",@"初九",@"初十",@"十一",@"十二",@"十三",@"十四",@"十五",@"十六",@"十七",@"十八",@"十九",@"二十",@"二一",@"二二",@"二三",@"二四",@"二五",@"二六",@"二七",@"二八",@"二九",@"三十"];
    self.gregorian = [NSCalendar calendarWithIdentifier:NSCalendarIdentifierGregorian];
    if ([self.extensionContext respondsToSelector:@selector(setWidgetLargestAvailableDisplayMode:)]) {
        self.extensionContext.widgetLargestAvailableDisplayMode = NCWidgetDisplayModeExpanded;
    } else {
        self.preferredContentSize = CGSizeMake(0, self.calendarHeight.constant);
    }

}

- (void)widgetActiveDisplayModeDidChange:(NCWidgetDisplayMode)activeDisplayMode withMaximumSize:(CGSize)maxSize
{
    if (activeDisplayMode == NCWidgetDisplayModeCompact) {
        [self.calendar setScope:FSCalendarScopeWeek animated:YES];
        self.preferredContentSize = maxSize;
    } else if (activeDisplayMode == NCWidgetDisplayModeExpanded) {
        [self.calendar setScope:FSCalendarScopeMonth animated:YES];
        self.preferredContentSize = CGSizeMake(maxSize.width, self.calendarHeight.constant);
    }
}

- (void)widgetPerformUpdateWithCompletionHandler:(void (^)(NCUpdateResult))completionHandler
{
    // Perform any setup necessary in order to update the view.

    // If an error is encountered, use NCUpdateResultFailed
    // If there's no update required, use NCUpdateResultNoData
    // If there's an update, use NCUpdateResultNewData

    completionHandler(NCUpdateResultNewData);
}

- (UIEdgeInsets)widgetMarginInsetsForProposedMarginInsets:(UIEdgeInsets)defaultMarginInsets
{
    return UIEdgeInsetsZero;
}

- (void)calendar:(FSCalendar *)calendar boundingRectWillChange:(CGRect)bounds animated:(BOOL)animated
{
    self.calendarHeight.constant = CGRectGetHeight(bounds);
    [self.view layoutIfNeeded];
    self.preferredContentSize = CGSizeMake(calendar.frame.size.width, self.calendarHeight.constant);
}

- (UIColor *)calendar:(FSCalendar *)calendar appearance:(FSCalendarAppearance *)appearance borderDefaultColorForDate:(NSDate *)date
{
    return [self.gregorian isDateInToday:date] ? appearance.todayColor : nil;
}

- (UIColor *)calendar:(FSCalendar *)calendar appearance:(FSCalendarAppearance *)appearance fillSelectionColorForDate:(NSDate *)date
{
    return [UIColor clearColor];
}

- (UIColor *)calendar:(FSCalendar *)calendar appearance:(FSCalendarAppearance *)appearance borderSelectionColorForDate:(NSDate *)date
{
    return appearance.selectionColor;
}

- (NSString *)calendar:(FSCalendar *)calendar subtitleForDate:(NSDate *)date
{
    NSInteger day = [_lunarCalendar components:NSCalendarUnitDay fromDate:date].day;
    return _lunarChars[day-1];
}

- (void)calendar:(FSCalendar *)calendar didSelectDate:(NSDate *)date atMonthPosition:(FSCalendarMonthPosition)monthPosition
{
    if (monthPosition != FSCalendarMonthPositionCurrent) {
        [calendar setCurrentPage:date animated:YES];
    }
}

- (IBAction)prevClicked:(id)sender
{
    NSCalendarUnit unit = (self.calendar.scope==FSCalendarScopeMonth) ? NSCalendarUnitMonth : NSCalendarUnitWeekOfYear;
    NSDate *prevPage = [self.gregorian dateByAddingUnit:unit value:-1 toDate:self.calendar.currentPage options:0];
    [self.calendar setCurrentPage:prevPage animated:YES];

}

- (IBAction)nextClicked:(id)sender
{
    NSCalendarUnit unit = (self.calendar.scope==FSCalendarScopeMonth) ? NSCalendarUnitMonth : NSCalendarUnitWeekOfYear;
    NSDate *nextPage = [self.gregorian dateByAddingUnit:unit value:1 toDate:self.calendar.currentPage options:0];
    [self.calendar setCurrentPage:nextPage animated:YES];
}

@end

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/colorBrown"
    android:fitsSystemWindows="true"
    android:orientation="vertical"

    tools:context="com.guokm.tibetanroot.activity.PersonInfoActivity">

    <include layout="@layout/title" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/colorBackground"
        android:padding="10dp"
        android:orientation="vertical">

        <TextView
            android:id="@+id/title_big"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textSize="24sp"
            android:text="大标题"
            />
        <LinearLayout
            android:layout_marginTop="20dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            >
        <TextView
            android:id="@+id/text_source"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="文字来源"
            />
            <TextView
                android:id="@+id/time"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="时间"
                android:layout_marginLeft="10dp"
                />
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="|"
                android:layout_marginLeft="10dp"
                android:layout_marginRight="10dp"
                />
            <TextView
                android:id="@+id/other_info"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="其他信息"
                />
        </LinearLayout>
        <TextView
            android:id="@+id/title_middle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textSize="22sp"
            android:text="章标题"
            android:layout_marginTop="20dp"
            />
        <TextView
            android:id="@+id/title_small"
            android:layout_marginTop="15dp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="1.0节标题"
            android:textSize="18sp"
            />
        <TextView
            android:id="@+id/body_tv"
            android:layout_marginTop="15dp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="这是文本内容这是文本内容这是文本内容这是文本内容"

            />

        <!--<RelativeLayout
            android:id="@+id/nickname_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/colorWrite"
            android:padding="20dp">

            <TextView
                android:id="@+id/title_message_tv"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:text="这是标题"
                android:textSize="20sp" />

            <TextView
                android:id="@+id/time_message_tv"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:text="01/01/2017"
                android:textSize="17sp" />

        </RelativeLayout>-->
    </LinearLayout>
</LinearLayout>


text:
package org.apache.jena.sparql.algebra.optimize;

import java.util.* ;

import org.apache.jena.query.SortCondition ;
import org.apache.jena.sparql.ARQInternalErrorException ;
import org.apache.jena.sparql.algebra.* ;
import org.apache.jena.sparql.algebra.op.* ;
import org.apache.jena.sparql.core.Var ;
import org.apache.jena.sparql.core.VarExprList ;
import org.apache.jena.sparql.expr.* ;

/**
 * A transform that tries to in-line/eliminate assignments
 *

 * There are two classes of assignments that we can try and in-line/eliminate:
 *

 *

 *
Assignments where the assigned variable is used only once in a subsequent
 * expression can be in-lined

 *
Assignments where the assigned value is never used elsewhere can be
 * eliminated

 *

 *
Eligibility for In-lining

 *

 * Both of these changes can only happen inside of projections as otherwise we
 * have to assume that the user may need the resulting variable and thus we
 * leave the assignment alone. Assignments to be in-lined must also be
 * deterministic i.e. moving their placement in the query and thus the possible
 * solutions they might operate must not change their outputs. Whether an
 * expression is deterministic is defined by {@link ExprLib#isStable(Expr)}.
 *

 *

 * In-lining must also respect variable scope, it is possible with a nested
 * query to have an assignment in-lined out through a projection that projects
 * it provided that the projection is appropriately modified.
 *

 *

 * There are also various other conditions on assignments that might be eligible
 * for in-lining:
 *

 *

 *
They cannot occur inside a n-ary operator (e.g. join, {@code UNION},
 * {@code OPTIONAL} etc.) because then in-lining would change semantics because
 * an expression that previously was only valid for part of the query might
 * become valid for a larger part of the query

 *
They cannot be in-lined into an {@code EXISTS} or {@code NOT EXISTS} in a
 * filter

 *
They cannot be in-lined out of a {@code DISTINCT} or {@code REDUCED}
 * because the assignment would be relevant for the purposes of distinctness

 *

 *

 * Please see JENA-780 for more
 * information on this.
 *

 *
In-lining Application

 *

 * Assignments may be in-lined in the following places:
 *

 *

 *
{@code FILTER} Expressions

 *
{@code BIND} and Project Expressions

 *
{@code ORDER BY} Expressions if aggressive in-lining is enabled or the
 * assigned expression is a constant

 *

 *

 * In the case of {@code ORDER BY} we only in-line assignments when aggressive
 * mode is set unless the assignment is a constant value. This is because during
 * order by evaluation expressions may be recomputed multiple times and so
 * in-lining may actually hurt performance in those cases unless the expression
 * to be in-lined is itself a constant.
 *

 */
public class TransformEliminateAssignments extends TransformCopy {

    public static Op eliminate(Op op) {
        return eliminate(op, false);
    }

    public static Op eliminate(Op op, boolean aggressive) {
        AssignmentTracker tracker = new AssignmentTracker();
        AssignmentPusher pusher = new AssignmentPusher(tracker);
        AssignmentPopper popper = new AssignmentPopper(tracker);
        Transform transform = new TransformEliminateAssignments(tracker, pusher, popper, aggressive);
        ExprTransform exprTransform = new ExprTransformEliminateAssignments(aggressive);

        return Transformer.transformSkipService(transform, exprTransform, op, pusher, popper);
    }

    private final OpVisitor before, after;
    private final AssignmentTracker tracker;
    private final boolean aggressive;

    private TransformEliminateAssignments(AssignmentTracker tracker, OpVisitor before, OpVisitor after) {
        this(tracker, before, after, false);
    }

    private TransformEliminateAssignments(AssignmentTracker tracker, OpVisitor before, OpVisitor after,
            boolean aggressive) {
        this.tracker = tracker;
        this.before = before;
        this.after = after;
        this.aggressive = aggressive;
    }

    protected boolean canInline(Expr e) {
        if (e == null)
            return false;
        return ExprLib.isStable(e);
    }

    protected boolean shouldInline(Expr e) {
        if (e == null)
            return false;

        // Inline everything when being aggressive
        if (this.aggressive)
            return true;

        // If not being aggressive only inline if the expression is a constant
        return e.isConstant() || e instanceof NodeValue;
    }

    protected boolean isApplicable() {
        // Can only be applied if we are inside a projection as otherwise the
        // assigned variables need to remain visible
        if (!this.tracker.insideProjection())
            return false;
        // If there are no eligible assignments then don't bother doing any work
        if (this.tracker.assignments.size() == 0)
            return false;

        // Otherwise may be applicable
        return true;
    }

    @Override
    public Op transform(OpExt opExt) {
        return opExt.apply(this, this.before, this.after);
    }

    @Override
    public Op transform(OpFilter opFilter, Op subOp) {
        if (!this.isApplicable())
            return super.transform(opFilter, subOp);

        // See what vars are used in the filter
        Set<Var> vars = new HashSet<>();
        for (Expr expr : opFilter.getExprs().getList()) {
            ExprVars.nonOpVarsMentioned(vars, expr);
        }

        // Are any of these vars single usage?
        ExprList exprs = opFilter.getExprs();
        boolean modified = false;
        for (Var var : vars) {
            // Usage count will be 2 if we can eliminate the assignment
            // First usage is when it is introduced by the assignment and the
            // second is when it is used now in this filter
            Expr e = getAssignExpr(var);
            if (this.tracker.getUsageCount(var) == 2 && hasAssignment(var) && canInline(e)) {
                // Can go back and eliminate that assignment
                subOp = eliminateAssignment(subOp, var);
                // Replace the variable usage with the expression
                exprs = ExprTransformer.transform(new ExprTransformSubstitute(var, e), exprs);
                this.tracker.getAssignments().remove(var);
                modified = true;
            }
        }

        // Create a new filter if we've substituted any expressions
        if (modified) {
            return OpFilter.filterBy(exprs, subOp);
        }

        return super.transform(opFilter, subOp);
    }

    private boolean hasAssignment(Var var) {
        return this.tracker.getAssignments().containsKey(var);
    }

    private Expr getAssignExpr(Var var) {
        return this.tracker.getAssignments().get(var);
    }

    @Override
    public Op transform(OpExtend opExtend, Op subOp) {
        // No point tracking assignments if not in a projection as we can't
        // possibly eliminate them without a projection to hide the fact that
        // the assigned value is unnecessary or only used once
        if (!this.tracker.insideProjection())
            return super.transform(opExtend, subOp);

        // Track the assignments for future reference
        this.tracker.putAssignments(opExtend.getVarExprList());

        // Eliminate and inline assignments
        VarExprList unusedAssignments = processUnused(opExtend.getVarExprList());
        VarExprList newAssignments = new VarExprList();
        for (Var assignVar : opExtend.getVarExprList().getVars()) {
            // If unused eliminate
            if (unusedAssignments != null && unusedAssignments.contains(assignVar))
                continue;

            Expr currExpr = opExtend.getVarExprList().getExpr(assignVar);

            // See what vars are used in the current expression
            Set<Var> vars = new HashSet<>();
            ExprVars.nonOpVarsMentioned(vars, currExpr);

            // See if we can inline anything
            for (Var var : vars) {
                // Usage count will be 2 if we can eliminate the assignment
                // First usage is when it is introduced by the assignment and
                // the second is when it is used now used in another assignment
                Expr e = getAssignExpr(var);
                if (this.tracker.getUsageCount(var) == 2 && hasAssignment(var) && canInline(e)) {
                    // Can go back and eliminate that assignment
                    subOp = eliminateAssignment(subOp, var);
                    // Replace the variable usage with the expression within
                    // expression
                    currExpr = ExprTransformer.transform(new ExprTransformSubstitute(var, e), currExpr);
                    this.tracker.getAssignments().remove(var);

                    // Need to update any assignments we may be tracking that
                    // refer to the variable we just inlined
                    this.tracker.updateAssignments(var, e);

                    // If the assignment to be eliminated was introduced by the
                    // extend we are processing need to remove it from the
                    // VarExprList we are currently building
                    if (newAssignments.contains(var) && newAssignments.getExpr(var).equals(e)) {
                        newAssignments.getVars().remove(var);
                        newAssignments.getExprs().remove(var);
                    }
                }
            }
            newAssignments.add(assignVar, currExpr);
        }

        // May be able to eliminate the extend entirely in some cases
        if (newAssignments.size() > 0) {
            return OpExtend.create(subOp, newAssignments);
        } else {
            return subOp;
        }
    }

    private VarExprList processUnused(VarExprList assignments) {
        if (Collections.disjoint(assignments.getVars(), this.tracker.getAssignments().keySet()))
            return null;

        VarExprList singleUse = new VarExprList();
        for (Var var : assignments.getVars()) {
            if (this.tracker.getUsageCount(var) == 1)
                singleUse.add(var, assignments.getExpr(var));
        }

        // If nothing is single use
        if (singleUse.size() == 0)
            return null;

        return singleUse;
    }

    @Override
    public Op transform(OpOrder opOrder, Op subOp) {
        if (!this.isApplicable())
            return super.transform(opOrder, subOp);

        // See what vars are used in the sort conditions
        Collection<Var> vars = new ArrayList<>();
        for (SortCondition cond : opOrder.getConditions()) {
            ExprVars.varsMentioned(vars, cond.getExpression());
        }

        // Are any of these vars single usage?
        List<SortCondition> conditions = null;
        for (Var var : vars) {
            // Usage count will be 2 if we can eliminate the assignment
            // First usage is when it is introduced by the assignment and the
            // second is when it is used now in this order expression
            Expr e = getAssignExpr(var);
            if (this.tracker.getUsageCount(var) == 2 && hasAssignment(var) && canInline(e) && shouldInline(e)) {
                // Can go back and eliminate that assignment
                subOp = eliminateAssignment(subOp, var);
                // Replace the variable usage with the expression within the
                // sort conditions
                conditions = processConditions(opOrder.getConditions(), conditions, var);
                this.tracker.getAssignments().remove(var);
            }
        }

        // Create a new order if we've substituted any expressions
        if (conditions != null) {
            return new OpOrder(subOp, conditions);
        }

        return super.transform(opOrder, subOp);
    }

    private List<SortCondition> processConditions(List<SortCondition> baseConditions,
            List<SortCondition> processedConditions, Var var) {
        List<SortCondition> inputConditions = processedConditions != null ? processedConditions : baseConditions;
        List<SortCondition> outputConditions = new ArrayList<>();

        for (SortCondition cond : inputConditions) {
            Expr e = cond.getExpression();
            e = ExprTransformer.transform(new ExprTransformSubstitute(var, getAssignExpr(var)), e);
            outputConditions.add(new SortCondition(e, cond.getDirection()));
        }

        return outputConditions;
    }

    @Override
    public Op transform(OpTopN opTop, Op subOp) {
        if (!this.isApplicable())
            return super.transform(opTop, subOp);

        // See what vars are used in the sort conditions
        Collection<Var> vars = new ArrayList<>();
        for (SortCondition cond : opTop.getConditions()) {
            ExprVars.varsMentioned(vars, cond.getExpression());
        }

        // Are any of these vars single usage?
        List<SortCondition> conditions = null;
        for (Var var : vars) {
            // Usage count will be 2 if we can eliminate the assignment
            // First usage is when it is introduced by the assignment and the
            // second is when it is used now in this filter
            Expr e = getAssignExpr(var);
            if (this.tracker.getUsageCount(var) == 2 && hasAssignment(var) && canInline(e) && shouldInline(e)) {
                // Can go back and eliminate that assignment
                subOp = eliminateAssignment(subOp, var);
                // Replace the variable usage with the expression within the
                // sort conditions
                conditions = processConditions(opTop.getConditions(), conditions, var);
                this.tracker.getAssignments().remove(var);
            }
        }

        // Create a new order if we've substituted any expressions
        if (conditions != null) {
            return new OpTopN(subOp, opTop.getLimit(), conditions);
        }

        return super.transform(opTop, subOp);
    }

    @Override
    public Op transform(OpGroup opGroup, Op subOp) {
        return super.transform(opGroup, subOp);

        // TODO Unclear if this will work properly or not because group can
        // introduce new assignments as well as evaluate expressions

        //@formatter:off
//        if (!this.isApplicable())
//            return super.transform(opGroup, subOp);
//
//        // See what vars are used in the filter
//        Collection<Var> vars = new ArrayList<>();
//        VarExprList exprs = new VarExprList(opGroup.getGroupVars());
//        List<ExprAggregator> aggs = new ArrayList<ExprAggregator>(opGroup.getAggregators());
//        for (Expr expr : exprs.getExprs().values()) {
//            ExprVars.varsMentioned(vars, expr);
//        }
//
//        // Are any of these vars single usage?
//        boolean modified = false;
//        for (Var var : vars) {
//            // Usage count will be 2 if we can eliminate the assignment
//            // First usage is when it is introduced by the assignment and the
//            // second is when it is used now in this group by
//            Expr e = getAssignExpr(var);
//            if (this.tracker.getUsageCount(var) == 2 && hasAssignment(var) && canInline(e)) {
//                // Can go back and eliminate that assignment
//                subOp = eliminateAssignment(subOp, var);
//                // Replace the variable usage with the expression in both the
//                // expressions and the aggregators
//                ExprTransform transform = new ExprTransformSubstitute(var, e);
//                exprs = processVarExprList(exprs, transform);
//                aggs = processAggregators(aggs, transform);
//                this.tracker.getAssignments().remove(var);
//                modified = true;
//            }
//        }
//
//        // Create a new group by if we've substituted any expressions
//        if (modified) {
//            return new OpGroup(subOp, exprs, aggs);
//        }
//
//        return super.transform(opGroup, subOp);
        //@formatter:on
    }

    private Op eliminateAssignment(Op subOp, Var var) {
        return Transformer.transform(new TransformRemoveAssignment(var, getAssignExpr(var)), subOp);
    }

    private VarExprList processVarExprList(VarExprList exprs, ExprTransform transform) {
        VarExprList newExprs = new VarExprList();
        for (Var v : exprs.getVars()) {
            Expr e = exprs.getExpr(v);
            Expr e2 = ExprTransformer.transform(transform, e);
            newExprs.add(v, e2);
        }
        return newExprs;
    }

    private List<ExprAggregator> processAggregators(List<ExprAggregator> aggs, ExprTransform transform) {
        List<ExprAggregator> newAggs = new ArrayList<>();
        for (ExprAggregator agg : aggs) {
            ExprAggregator e2 = (ExprAggregator) ExprTransformer.transform(transform, agg);
            newAggs.add(e2);
        }
        return newAggs;
    }

    private static class AssignmentTracker extends VariableUsageTracker {

        private Map<Var, Expr> assignments = new HashMap<>();
        private int depth = 0;

        public Map<Var, Expr> getAssignments() {
            return this.assignments;
        }

        public void putAssignments(VarExprList assignments) {
            for (Var var : assignments.getVars()) {
                int i = getUsageCount(var);
                if (i <= 2) {
                    this.assignments.put(var, assignments.getExpr(var));
                } else {
                    this.assignments.remove(var);
                }
            }
        }

        @Override
        public void increment(String var) {
            super.increment(var);

            int i = getUsageCount(var);
            if (i > 2) {
                this.assignments.remove(Var.alloc(var));
            }
        }

        public void updateAssignments(Var v, Expr e) {
            ExprTransformSubstitute transform = new ExprTransformSubstitute(v, e);
            for (Var assignVar : this.assignments.keySet()) {
                Expr assignExpr = this.assignments.get(assignVar);
                assignExpr = ExprTransformer.transform(transform, assignExpr);
                this.assignments.put(assignVar, assignExpr);
            }
        }

        public void incrementDepth() {
            this.depth++;
        }

        public void decrementDepth() {
            this.depth--;
            // Clear all assignments if not inside a project
            if (this.depth == 0)
                this.assignments.clear();
        }

        public boolean insideProjection() {
            return this.depth > 0;
        }
    }

    private static class AssignmentPusher extends VariableUsagePusher {

        private AssignmentTracker assignmentTracker;

        public AssignmentPusher(AssignmentTracker tracker) {
            super(tracker);
            this.assignmentTracker = tracker;
        }

        @Override
        public void visit(OpProject opProject) {
            super.visit(opProject);
            this.assignmentTracker.incrementDepth();
        }
    }

    private static class AssignmentPopper extends OpVisitorBase {

        private AssignmentTracker tracker;

        public AssignmentPopper(AssignmentTracker tracker) {
            this.tracker = tracker;
        }

        @Override
        public void visit(OpProject opProject) {
            // Any assignments that are not projected should be discarded at
            // this point
            Iterator<Var> vars = tracker.getAssignments().keySet().iterator();
            while (vars.hasNext()) {
                Var var = vars.next();
                if (!opProject.getVars().contains(var))
                    vars.remove();
            }
            tracker.pop();
            this.tracker.decrementDepth();
        }

        @Override
        public void visit(OpUnion opUnion) {
            unsafe();
        }

        @Override
        public void visit(OpJoin opJoin) {
            unsafe();
        }

        @Override
        public void visit(OpLeftJoin opLeftJoin) {
            // TODO Technically if the assignment is single use and comes from
            // the LHS we could keep it but for now we don't try and do this
            unsafe();
        }

        @Override
        public void visit(OpMinus opMinus) {
            // Anything from the RHS doesn't project out anyway
            unsafe();
        }

        @Override
        public void visit(OpDistinct opDistinct) {
            // Inlining out through the distinct might change the results of the
            // distinct
            unsafe();
        }

        @Override
        public void visit(OpReduced opReduced) {
            // Inlining out through the reduced might change the results of the
            // reduced
            unsafe();
        }

        private void unsafe() {
            // Throw out any assignments because if they would be eligible their
            // values can't be bound in every branch of the union and thus
            // inlining could change the semantics
            tracker.getAssignments().clear();
        }
    }

    /**
     * Handles expression transforms for eliminating assignments
     */
    private static class ExprTransformEliminateAssignments extends ExprTransformCopy {

        private final boolean aggressive;

        /**
         * @param aggressive
         *            Whether to inline aggressively
         */
        public ExprTransformEliminateAssignments(boolean aggressive) {
            this.aggressive = aggressive;
        }

        @Override
        public Expr transform(ExprFunctionOp funcOp, ExprList args, Op opArg) {
            // Need to use fresh visitors when working inside an exists/not
            // exists as we should only do self-contained inlining

            AssignmentTracker tracker = new AssignmentTracker();
            AssignmentPusher pusher = new AssignmentPusher(tracker);
            AssignmentPopper popper = new AssignmentPopper(tracker);
            Transform transform = new TransformEliminateAssignments(tracker, pusher, popper, aggressive);
            ExprTransformEliminateAssignments exprTransform = new ExprTransformEliminateAssignments(aggressive);

            Op opArg2 = Transformer.transform(transform, exprTransform, opArg, pusher, popper);
            if (opArg2 == opArg)
                return super.transform(funcOp, args, opArg);
            if (funcOp instanceof E_Exists)
                return new E_Exists(opArg2);
            if (funcOp instanceof E_NotExists)
                return new E_NotExists(opArg2);
            throw new ARQInternalErrorException("Unrecognized ExprFunctionOp: \n" + funcOp);
        }
    }
}


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Reise russ. Reich. 3:751. 1776

#### Original name
null

### Remarks
null


text:
{% extends "base.html" %}

{% block title %}Farm Stand - Permission Denied{% endblock %}

{% block page_content %}

Permission Denied

{% endblock %}


text:
import {Menu} from 'antd';
import PropTypes from 'prop-types';
import {SK} from 'sk-js';
import {MENU_MODE, THEME} from '../AntdConst';

Menu.defaultProps = SK.extends(true, {}, {
  //inlineIndent: 24,
  //mode: MENU_MODE.Vertical,
  //multiple: false,
  //selectable: true,
  //theme: THEME.Light,
  //onOpenChange: noop,
  //subMenuOpenDelay: 0,
  //subMenuCloseDelay: 0.1,
  //forceSubMenuRender: false,
}, Menu.defaultProps, {});
Menu.propTypes = SK.extends(true, {
  level: PropTypes.number,
  parentMenu: PropTypes.object,
  prefixCls: PropTypes.string,
  rootPrefixCls: PropTypes.string,
}, {
  //https://ant.design/components/menu-cn/#Menu
  defaultOpenKeys: PropTypes.any,
  defaultSelectedKeys: PropTypes.array,
  inlineCollapsed: PropTypes.bool,
  inlineIndent: PropTypes.number,
  mode: PropTypes.oneOf(Object.values(MENU_MODE)),
  multiple: PropTypes.bool,
  openKeys: PropTypes.array,
  selectable: PropTypes.bool,
  selectedKeys: PropTypes.array,
  style: PropTypes.object,
  theme: PropTypes.oneOf(Object.values(THEME)),
  onClick: PropTypes.func,
  onDeselect: PropTypes.func,
  onOpenChange: PropTypes.func,
  onSelect: PropTypes.func,
  subMenuOpenDelay: PropTypes.number,
  subMenuCloseDelay: PropTypes.number,
  forceSubMenuRender: PropTypes.bool,
  //https://github.com/react-component/menu#menu-props
  activeKey: PropTypes.object,
  defaultActiveFirst: PropTypes.bool,
  triggerSubMenuAction: PropTypes.string,
  openAnimation: PropTypes.oneOfType([
    PropTypes.object,
    PropTypes.string,
  ]),
  openTransition: PropTypes.string,
  getPopupContainer: PropTypes.func,
}, Menu.propTypes, {});

Menu.NON_SK_COMP_NAME = 'Menu';

export default class OriginMenu {
  static defaultProps = SK.extends(true, {}, Menu.defaultProps, {});
  static propTypes = SK.extends(true, {}, Menu.propTypes, {});
}


text:
Commands

Open github
Go top left on the desktop github
1) >git clone <nectr>
2) >cd nectr

open Docker
1)	>docker-compose –f dev.yml build
2)	> docker-compose –f dev.yml up
3)

To get to admin
For mac
- http://127.0.0.1:8000/admin


text:
using System;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using FILETIME=System.Runtime.InteropServices.ComTypes.FILETIME;
using STATSTG=System.Runtime.InteropServices.ComTypes.STATSTG;

namespace Splicer.Utilities
{

    #region Unmanaged Code declarations

    [Flags]
    internal enum STGM
    {
        Read = 0x00000000,
        Write = 0x00000001,
        ReadWrite = 0x00000002,
        ShareDenyNone = 0x00000040,
        ShareDenyRead = 0x00000030,
        ShareDenyWrite = 0x00000020,
        ShareExclusive = 0x00000010,
        Priority = 0x00040000,
        Create = 0x00001000,
        Convert = 0x00020000,
        FailIfThere = 0x00000000,
        Direct = 0x00000000,
        Transacted = 0x00010000,
        NoScratch = 0x00100000,
        NoSnapShot = 0x00200000,
        Simple = 0x08000000,
        DirectSWMR = 0x00400000,
        DeleteOnRelease = 0x04000000,
    }

    [Flags]
    internal enum STGC
    {
        Default = 0,
        Overwrite = 1,
        OnlyIfCurrent = 2,
        DangerouslyCommitMerelyToDiskCache = 4,
        Consolidate = 8
    }

    [Guid("0000000b-0000-0000-C000-000000000046"),
     InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    internal interface IStorage
    {
        [PreserveSig]
        int CreateStream(
            [In, MarshalAs(UnmanagedType.LPWStr)] string pwcsName,
            [In] STGM grfMode,
            [In] int reserved1,
            [In] int reserved2,
            [Out] out IStream ppstm
            );

        [PreserveSig]
        int OpenStream(
            [In, MarshalAs(UnmanagedType.LPWStr)] string pwcsName,
            [In] IntPtr reserved1,
            [In] STGM grfMode,
            [In] int reserved2,
            [Out] out IStream ppstm
            );

        [PreserveSig]
        int CreateStorage(
            [In, MarshalAs(UnmanagedType.LPWStr)] string pwcsName,
            [In] STGM grfMode,
            [In] int reserved1,
            [In] int reserved2,
            [Out] out IStorage ppstg
            );

        [PreserveSig]
        int OpenStorage(
            [In, MarshalAs(UnmanagedType.LPWStr)] string pwcsName,
            [In] IStorage pstgPriority,
            [In] STGM grfMode,
            [In] int snbExclude,
            [In] int reserved,
            [Out] out IStorage ppstg
            );

        [PreserveSig]
        int CopyTo(
            [In] int ciidExclude,
            [In] Guid[] rgiidExclude,
            [In] string[] snbExclude,
            [In] IStorage pstgDest
            );

        [PreserveSig]
        int MoveElementTo(
            [In, MarshalAs(UnmanagedType.LPWStr)] string pwcsName,
            [In] IStorage pstgDest,
            [In, MarshalAs(UnmanagedType.LPWStr)] string pwcsNewName,
            [In] STGM grfFlags
            );

        [PreserveSig]
        int Commit([In] STGC grfCommitFlags);

        [PreserveSig]
        int Revert();

        [PreserveSig]
        int EnumElements(
            [In] int reserved1,
            [In] IntPtr reserved2,
            [In] int reserved3,
            [Out, MarshalAs(UnmanagedType.Interface)] out object ppenum
            );

        [PreserveSig]
        int DestroyElement([In, MarshalAs(UnmanagedType.LPWStr)] string pwcsName);

        [PreserveSig]
        int RenameElement(
            [In, MarshalAs(UnmanagedType.LPWStr)] string pwcsOldName,
            [In, MarshalAs(UnmanagedType.LPWStr)] string pwcsNewName
            );

        [PreserveSig]
        int SetElementTimes(
            [In, MarshalAs(UnmanagedType.LPWStr)] string pwcsName,
            [In] FILETIME pctime,
            [In] FILETIME patime,
            [In] FILETIME pmtime
            );

        [PreserveSig]
        int SetClass([In, MarshalAs(UnmanagedType.LPStruct)] Guid clsid);

        [PreserveSig]
        int SetStateBits(
            [In] int grfStateBits,
            [In] int grfMask
            );

        [PreserveSig]
        int Stat([Out] out STATSTG pStatStg,
                 [In] int grfStatFlag
            );
    }

    #endregion

    internal sealed class NativeMethods
    {
        private NativeMethods()
        {
        }

        [DllImport("ole32.dll")]
        public static extern int CreateBindCtx(int reserved, out IBindCtx ppbc);

        [DllImport("ole32.dll")]
        public static extern int MkParseDisplayName(IBindCtx pcb,
                                                    [MarshalAs(UnmanagedType.LPWStr)] string szUserName,
                                                    out int pchEaten, out IMoniker ppmk);

        [DllImport("olepro32.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
        public static extern int OleCreatePropertyFrame(
            [In] IntPtr hwndOwner,
            [In] int x,
            [In] int y,
            [In, MarshalAs(UnmanagedType.LPWStr)] string lpszCaption,
            [In] int cObjects,
            [In, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.IUnknown)] object[] ppUnk,
            [In] int cPages,
            [In] IntPtr pPageClsID,
            [In] int lcid,
            [In] int dwReserved,
            [In] IntPtr pvReserved
            );

        [DllImport("ole32.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
        public static extern int StgCreateDocfile(
            [In, MarshalAs(UnmanagedType.LPWStr)] string pwcsName,
            [In] STGM grfMode,
            [In] int reserved,
            [Out] out IStorage ppstgOpen
            );

        [DllImport("ole32.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
        public static extern int StgIsStorageFile([In, MarshalAs(UnmanagedType.LPWStr)] string pwcsName);

        [DllImport("ole32.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
        public static extern int StgOpenStorage(
            [In, MarshalAs(UnmanagedType.LPWStr)] string pwcsName,
            [In] IStorage pstgPriority,
            [In] STGM grfMode,
            [In] IntPtr snbExclude,
            [In] int reserved,
            [Out] out IStorage ppstgOpen
            );
    }
}


text:
require 'rubygems'
require 'influxdb'

influxdb = InfluxDB::Client.new(:host => "127.0.0.1")

database = 'test'
username = 'root'
password = 'root'

influxdb = InfluxDB::Client.new(database, :username => username, :password => password)

# Enumerator that emits a sine wave
value = (0..360).to_a.map {|i| Math.send(:sin, i / 10.0) * 10 }.each

puts "Writing one point every second - Please kill when you are done me because I won't stop"

loop do
  data = {
    :value => value.next
  }

  influxdb.write_point('sine', data)

  sleep 1
end


text:
export { default as Inline } from "./inline-query"
export { default as Variable } from "./variable-query"
export { default as ExportedVariable } from "./exported-variable-query"
export { default as Destructuring } from "./destructuring"


text:
<?php

final class PhabricatorFileTransformTestCase extends PhabricatorTestCase {

  protected function getPhabricatorTestCaseConfiguration() {
    return array(
      self::PHABRICATOR_TESTCONFIG_BUILD_STORAGE_FIXTURES => true,
    );
  }

  public function testGetAllTransforms() {
    PhabricatorFileTransform::getAllTransforms();
    $this->assertTrue(true);
  }

  public function testThumbTransformDefaults() {
    $xforms = PhabricatorFileTransform::getAllTransforms();
    $file = new PhabricatorFile();

    foreach ($xforms as $xform) {
      if (!($xform instanceof PhabricatorFileThumbnailTransform)) {
        continue;
      }

      // For thumbnails, generate the default thumbnail. This should be able
      // to generate something rather than throwing an exception because we
      // forgot to add a default file to the builtin resources. See T12614.
      $xform->getDefaultTransform($file);

      $this->assertTrue(true);
    }
  }

}


text:
#ifndef TUSB_VERIFY_H_
#define TUSB_VERIFY_H_

#include <stdbool.h>
#include <stdint.h>
#include "tusb_option.h"
#include "tusb_compiler.h"

/*------------------------------------------------------------------*/
/* This file use an advanced macro technique to mimic the default parameter
 * as C++ for the sake of code simplicity. Beware of a headache macro
 * manipulation that you are told to stay away.
 *
 * This contains macros for both VERIFY and ASSERT:
 *
 *   VERIFY: Used when there is an error condition which is not the
 *           fault of the MCU. For example, bounds checking on data
 *           sent to the micro over USB should use this function.
 *           Another example is checking for buffer overflows, where
 *           returning from the active function causes a NAK.
 *
 *   ASSERT: Used for error conditions that are caused by MCU firmware
 *           bugs. This is used to discover bugs in the code more
 *           quickly. One example would be adding assertions in library
 *           function calls to confirm a function's (untainted)
 *           parameters are valid.
 *
 * The difference in behavior is that ASSERT triggers a breakpoint while
 * verify does not.
 *
 *   #define TU_VERIFY(cond)                  if(cond) return false;
 *   #define TU_VERIFY(cond,ret)              if(cond) return ret;
 *
 *   #define TU_VERIFY_HDLR(cond,handler)     if(cond) {handler; return false;}
 *   #define TU_VERIFY_HDLR(cond,ret,handler) if(cond) {handler; return ret;}
 *
 *   #define TU_ASSERT(cond)                  if(cond) {_MESS_FAILED(); TU_BREAKPOINT(), return false;}
 *   #define TU_ASSERT(cond,ret)              if(cond) {_MESS_FAILED(); TU_BREAKPOINT(), return ret;}
 *
 *------------------------------------------------------------------*/

#ifdef __cplusplus
 extern "C" {
#endif

//--------------------------------------------------------------------+
// TU_VERIFY Helper
//--------------------------------------------------------------------+

#if CFG_TUSB_DEBUG
  #include <stdio.h>
  #define _MESS_FAILED()    tu_printf("%s %d: ASSERT FAILED\r\n", __func__, __LINE__)
#else
  #define _MESS_FAILED() do {} while (0)
#endif

// Halt CPU (breakpoint) when hitting error, only apply for Cortex M3, M4, M7, M33
#if defined(__ARM_ARCH_7M__) || defined (__ARM_ARCH_7EM__) || defined(__ARM_ARCH_8M_MAIN__)
  #define TU_BREAKPOINT() do                                                                                \
  {                                                                                \
    volatile uint32_t* ARM_CM_DHCSR =  ((volatile uint32_t*) 0xE000EDF0UL); /* Cortex M CoreDebug->DHCSR */ \
    if ( (*ARM_CM_DHCSR) & 1UL ) __asm("BKPT #0\n"); /* Only halt mcu if debugger is attached */            \
  } while(0)

#elif defined(__riscv)
  #define TU_BREAKPOINT() do { __asm("ebreak\n"); } while(0)

#elif defined(_mips)
  #define TU_BREAKPOINT() do { __asm("sdbbp 0"); } while (0)

#else
  #define TU_BREAKPOINT() do {} while (0)
#endif

/*------------------------------------------------------------------*/
/* Macro Generator
 *------------------------------------------------------------------*/

// Helper to implement optional parameter for TU_VERIFY Macro family
#define _GET_3RD_ARG(arg1, arg2, arg3, ...)        arg3
#define _GET_4TH_ARG(arg1, arg2, arg3, arg4, ...)  arg4

/*------------- Generator for TU_VERIFY and TU_VERIFY_HDLR -------------*/
#define TU_VERIFY_DEFINE(_cond, _handler, _ret)  do            \
{                                                              \
  if ( !(_cond) ) { _handler; return _ret;  }                  \
} while(0)

/*------------------------------------------------------------------*/
/* TU_VERIFY
 * - TU_VERIFY_1ARGS : return false if failed
 * - TU_VERIFY_2ARGS : return provided value if failed
 *------------------------------------------------------------------*/
#define TU_VERIFY_1ARGS(_cond)                         TU_VERIFY_DEFINE(_cond, , false)
#define TU_VERIFY_2ARGS(_cond, _ret)                   TU_VERIFY_DEFINE(_cond, , _ret)

#define TU_VERIFY(...)                   _GET_3RD_ARG(__VA_ARGS__, TU_VERIFY_2ARGS, TU_VERIFY_1ARGS, UNUSED)(__VA_ARGS__)

/*------------------------------------------------------------------*/
/* TU_VERIFY WITH HANDLER
 * - TU_VERIFY_HDLR_2ARGS : execute handler, return false if failed
 * - TU_VERIFY_HDLR_3ARGS : execute handler, return provided error if failed
 *------------------------------------------------------------------*/
#define TU_VERIFY_HDLR_2ARGS(_cond, _handler)           TU_VERIFY_DEFINE(_cond, _handler, false)
#define TU_VERIFY_HDLR_3ARGS(_cond, _handler, _ret)     TU_VERIFY_DEFINE(_cond, _handler, _ret)

#define TU_VERIFY_HDLR(...)              _GET_4TH_ARG(__VA_ARGS__, TU_VERIFY_HDLR_3ARGS, TU_VERIFY_HDLR_2ARGS,UNUSED)(__VA_ARGS__)

/*------------------------------------------------------------------*/
/* ASSERT
 * basically TU_VERIFY with TU_BREAKPOINT() as handler
 * - 1 arg : return false if failed
 * - 2 arg : return error if failed
 *------------------------------------------------------------------*/
#define ASSERT_1ARGS(_cond)            TU_VERIFY_DEFINE(_cond, _MESS_FAILED(); TU_BREAKPOINT(), false)
#define ASSERT_2ARGS(_cond, _ret)      TU_VERIFY_DEFINE(_cond, _MESS_FAILED(); TU_BREAKPOINT(), _ret)

#ifndef TU_ASSERT
#define TU_ASSERT(...)             _GET_3RD_ARG(__VA_ARGS__, ASSERT_2ARGS, ASSERT_1ARGS,UNUSED)(__VA_ARGS__)
#endif

/*------------------------------------------------------------------*/
/* ASSERT HDLR
 *------------------------------------------------------------------*/

#ifdef __cplusplus
 }
#endif

#endif /* TUSB_VERIFY_H_ */