https://github.com/johnnythetank/angular-instagram-api-factory
AngularJS factory for Instagram JSON REST API requests
https://github.com/johnnythetank/angular-instagram-api-factory
Last synced: 11 months ago
JSON representation
AngularJS factory for Instagram JSON REST API requests
- Host: GitHub
- URL: https://github.com/johnnythetank/angular-instagram-api-factory
- Owner: JohnnyTheTank
- License: mit
- Created: 2015-11-13T14:45:03.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-04-05T09:42:15.000Z (about 8 years ago)
- Last Synced: 2024-11-11T13:10:57.433Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 24.4 KB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
**angular-instagram-api-factory** is an angularjs module with a instagram api factory.
[](https://badge.fury.io/js/angular-instagram-api-factory)
[](https://badge.fury.io/bo/angular-instagram-api-factory)
Author: Jonathan Hornung ([JohnnyTheTank](https://github.com/JohnnyTheTank))
:warning: **This use case is not supported anymore. On June 1, 2016 Instagram changed the permissions and all apps moved automatically to Sandbox Mode if they were not approved through the [review process](https://www.instagram.com/developer/review/).**
## Usage
1. Install via either [bower](http://bower.io/), [npm](https://www.npmjs.com/) or downloaded files:
1. `bower install --save angular-instagram-api-factory`
2. `npm install --save angular-instagram-api-factory`
3. download [angular-instagram-api-factory.zip](https://github.com/JohnnyTheTank/angular-instagram-api-factory/zipball/master)
2. Add `jtt_instagram` to your application's module dependencies.
3. Include dependencies in your HTML.
1. When using bower:
```html
```
2. When using npm:
```html
```
3. when using downloaded files
```html
```
4. Use the factory `instagramFactory`
### factory methods
#### getMedia
```js
instagramFactory.getMediaFromUserById({
userId: "",
count: "", // (optional) valid values: 1-33 | default: 20
min_id: "", // (optional)
max_id: "", // (optional)
min_timestamp: "", // (optional)
max_timestamp: "", // (optional)
access_token: "",
}).then(function (_data) {
//on success
}).catch(function (_data) {
//on error
});
```
```js
instagramFactory.getMediaByTag({
tag: "",
count: "", // (optional) valid values: 1-33 | default: 20
min_tag_id: "", // (optional)
max_tag_id: "", // (optional)
min_timestamp: "", // (optional)
max_timestamp: "", // (optional)
access_token: "",
}).then(function (_data) {
//on success
}).catch(function (_data) {
//on error
});
```
```js
instagramFactory.getMediaFromLocationById({
locationId: "",
count: "", // (optional) valid values: 1-33 | default: 20
min_id: "", // (optional)
max_id: "", // (optional)
min_timestamp: "", // (optional)
max_timestamp: "", // (optional)
access_token: "",
}).then(function (_data) {
//on success
}).catch(function (_data) {
//on error
});
```
```js
instagramFactory.getMediaByCoordinates({
lat: "",
lng: "",
distance: "", // (optional) in meters, default: 1000
count: "", // (optional) valid values: 1-33 | default: 20 (this parameter maybe don't work correct)
min_timestamp: "", // (optional)
max_timestamp: "", // (optional)
access_token: "",
}).then(function (_data) {
//on success
}).catch(function (_data) {
//on error
});
```
#### getUser
```js
instagramFactory.getUserById({
userId: "",
access_token: "",
}).then(function (_data) {
//on success
}).catch(function (_data) {
//on error
});
```
## Instagram JSONP API
* Docs: https://instagram.com/developer/endpoints/
* Api Console: https://apigee.com/console/instagram
* Username Converter: http://jelled.com/instagram/lookup-user-id
## More angular-api-factories
[bandsintown](https://github.com/JohnnyTheTank/angular-bandsintown-api-factory) - [dailymotion](https://github.com/JohnnyTheTank/angular-dailymotion-api-factory) - [facebook](https://github.com/JohnnyTheTank/angular-facebook-api-factory) - [flickr](https://github.com/JohnnyTheTank/angular-flickr-api-factory) - [footballdata](https://github.com/JohnnyTheTank/angular-footballdata-api-factory) - [github](https://github.com/JohnnyTheTank/angular-github-api-factory) - [openweathermap](https://github.com/JohnnyTheTank/angular-openweathermap-api-factory) - [tumblr](https://github.com/JohnnyTheTank/angular-tumblr-api-factory) - [vimeo](https://github.com/JohnnyTheTank/angular-vimeo-api-factory) - [wikipedia](https://github.com/JohnnyTheTank/angular-wikipedia-api-factory) - [youtube](https://github.com/JohnnyTheTank/angular-youtube-api-factory)
## License
MIT