{"id":15019423,"url":"https://github.com/johnnythetank/aping-plugin-instagram","last_synced_at":"2025-04-01T23:30:56.527Z","repository":{"id":57182146,"uuid":"46178658","full_name":"JohnnyTheTank/apiNG-plugin-instagram","owner":"JohnnyTheTank","description":"Instagram Plugin for apiNG","archived":false,"fork":false,"pushed_at":"2018-04-05T08:47:04.000Z","size":54,"stargazers_count":1,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-02T22:03:35.057Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JohnnyTheTank.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-14T14:55:19.000Z","updated_at":"2018-04-05T08:47:06.000Z","dependencies_parsed_at":"2022-09-12T23:50:26.171Z","dependency_job_id":null,"html_url":"https://github.com/JohnnyTheTank/apiNG-plugin-instagram","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnnyTheTank%2FapiNG-plugin-instagram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnnyTheTank%2FapiNG-plugin-instagram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnnyTheTank%2FapiNG-plugin-instagram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnnyTheTank%2FapiNG-plugin-instagram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JohnnyTheTank","download_url":"https://codeload.github.com/JohnnyTheTank/apiNG-plugin-instagram/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222779989,"owners_count":17036546,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T19:53:27.649Z","updated_at":"2024-11-02T22:03:54.056Z","avatar_url":"https://github.com/JohnnyTheTank.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[logo]: http://aping.io/logo/320/aping-plugin.png \"apiNG Plugin\"\n![apiNG][logo]\n\n[![Join the chat at https://gitter.im/JohnnyTheTank/apiNG](https://img.shields.io/badge/GITTER-join%20chat-green.svg)](https://gitter.im/JohnnyTheTank/apiNG?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![npm version](https://badge.fury.io/js/aping-plugin-instagram.png)](https://badge.fury.io/js/aping-plugin-instagram)\n[![Bower version](https://badge.fury.io/bo/apiNG-plugin-instagram.png)](https://badge.fury.io/bo/apiNG-plugin-instagram)\n\n**_apiNG-plugin-instagram_** is a [Instagram REST API](https://www.instagram.com/developer/endpoints/media/) plugin for [**apiNG**](https://github.com/JohnnyTheTank/apiNG).\n\n# Information\n\n: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/).**\n\n* **Supported apiNG models: `social`, `video`, `image`**\n* This plugin supports the [`get-native-data` parameter](https://aping.readme.io/docs/advanced#parameters)\n* This plugin needs an [access token](#2-access-token) :warning:\n* Used promise library: [angular-instagram-api-factory](https://github.com/JohnnyTheTank/angular-instagram-api-factory) _(included in distribution files)_\n\n# Documentation\n\n1. [INSTALLATION](#1-installation)\n    1. Get file\n    2. Include file\n    3. Add dependency\n    4. Add plugin\n2. [ACCESS TOKEN](#2-access-token)\n    1. Generate your `access_token`\n    2. Insert your `access_token` into `aping-config.js`\n3. [USAGE](#3-usage)\n    1. Models\n    2. Requests\n    3. Rate limit\n\n## 1. INSTALLATION\n\n### I. Get file\nInstall via either [bower](http://bower.io/), [npm](https://www.npmjs.com/), CDN (jsDelivr)  or downloaded files:\n\n* `bower install apiNG-plugin-instagram --save`\n* `npm install aping-plugin-instagram --save`\n* use [CDN file](https://www.jsdelivr.com/projects/aping.plugin-instagram)\n* download [apiNG-plugin-instagram.zip](https://github.com/JohnnyTheTank/apiNG-plugin-instagram/zipball/master)\n\n### II. Include file\nInclude `aping-plugin-instagram.min.js` in your apiNG application\n\n```html\n\u003c!-- when using bower --\u003e\n\u003cscript src=\"bower_components/apiNG-plugin-instagram/dist/aping-plugin-instagram.min.js\"\u003e\u003c/script\u003e\n\n\u003c!-- when using npm --\u003e\n\u003cscript src=\"node_modules/aping-plugin-instagram/dist/aping-plugin-instagram.min.js\"\u003e\u003c/script\u003e\n\n\u003c!-- when using cdn file --\u003e\n\u003cscript src=\"//cdn.jsdelivr.net/npm/aping-plugin-instagram@latest/dist/aping-plugin-instagram.min.js\"\u003e\u003c/script\u003e\n\n\u003c!-- when using downloaded files --\u003e\n\u003cscript src=\"aping-plugin-instagram.min.js\"\u003e\u003c/script\u003e\n```\n\n### III. Add dependency\nAdd the module `jtt_aping_instagram` as a dependency to your app module:\n```js\nangular.module('app', ['jtt_aping', 'jtt_aping_instagram']);\n```\n\n### IV. Add the plugin\nAdd the plugin's directive `aping-instagram=\"[]\"` to your apiNG directive and [configure your requests](#ii-requests)\n```html\n\u003caping\n    template-url=\"templates/social.html\"\n    model=\"social\"\n    items=\"20\"\n    aping-instagram=\"[{'tag':'camping'}]\"\u003e\n\u003c/aping\u003e\n```\n\n## 2. ACCESS TOKEN\n\n### I. Generate your `access_token`\n1. Login on [instagram.com/developer](https://www.instagram.com/developer/)\n2. Navigate to [instagram.com/developer/clients/manage](https://www.instagram.com/developer/clients/manage/)\n3. Register a \"New Client ID\"\n4. Generate access_token\n    1. via browser \n        * Open ` https://api.instagram.com/oauth/authorize/?client_id=CLIENT-ID\u0026redirect_uri=REDIRECT-URI\u0026response_type=token` with information from http://instagram.com/developer/clients/manage/\n        * Accept the alert from instagram\n        * Get your access_token from the url bar of your browser\n    2. OR via curl:\n    \n```\n            curl \\-F 'client_id=CLIENT-ID' \\\n                -F 'client_secret=CLIENT-SECRET' \\\n                -F 'grant_type=authorization_code' \\\n                -F 'redirect_uri=YOUR-REDIRECT-URI' \\\n                -F 'code=CODE' \\\n                https://api.instagram.com/oauth/access_token\n```\n\n\n### II. Insert your `access_token` into `aping-config.js`\nCreate and open `js/apiNG/aping-config.js` in your application folder. It should be look like this snippet:\n```js\nangular.module('jtt_aping').config(['$provide', function ($provide) {\n    $provide.value(\"apingDefaultSettings\", {\n        apingApiKeys : {\n            instagram : [\n                {'access_token':'\u003cYOUR_INSTAGRAM_ACCESS_TOKEN\u003e'},\n            ]\n            //...\n        }\n    });\n}]);\n```\n\n:warning: Replace `\u003cYOUR_INSTAGRAM_ACCESS_TOKEN\u003e` with your instagram `access_token`\n\n## 3. USAGE\n\n### I. Models\nSupported apiNG models\n\n|  model   | content | support | max items\u003cbr\u003eper request | (native) default items\u003cbr\u003eper request |\n|----------|---------|---------|--------|---------|\n| `social` | **images**, **videos** | full    | `33`   | `20`   |\n| `image`  | **images** | partly    | `33`   | `20`   |\n| `video`  | **videos** | partly    | `33`   | `20`   |\n\n**support:**\n* full: _the source platform provides a full list with usable results_ \u003cbr\u003e\n* partly: _the source platfrom provides just partly usable results_\n\n\n### II. Requests\nEvery **apiNG plugin** expects an array of **requests** as html attribute.\n\n#### Requests by Tag\n|  parameter  | sample | default | description | optional |\n|----------|---------|---------|---------|---------|\n| **`tag`** | `camping` |  | Search Tag (without #) | no |\n| **`items`**  | `10` | `20` | Items per request (`0`-`33`) |  yes  |\n\nSample requests:\n* `[{'tag':'soccer'}, {'tag':'nofilter'}]`\n* `[{'tag':'eagle', 'items':10}]`\n\n#### Requests by User\n|  parameter  | sample | default | description | optional |\n|----------|---------|---------|---------|---------|\n| **`userId`** | `416104304` |  | The `userId` of an instagram user\u003cbr\u003e[Username to userId converter](http://jelled.com/instagram/lookup-user-id) | no |\n| **`items`**  | `10` | `20` | Items per request (`0`-`33`) |  yes  |\n\nSample request:\n* `[{'userId':'416104304', 'items':10}]`\n\n#### Requests by Coordinates\n|  parameter  | sample | default | description | optional |\n|----------|---------|---------|---------|---------|\n| **`lat`** | `-13.163333` |  | Latitude of the center search coordinate. If used, lng is required | yes |\n| **`lng`** | `-72.545556` |  | Longitude of the center search coordinate. If used, lat is required | yes |\n| **`distance`** | `2500` | `1000` | Radius of the center search coordinates in meters. Max distance is `5000` meters | yes |\n| **`items`**  | `10` | `20` | Items per request (`0`-`33`) |  yes  |\n\nSample request:\n* `[{'lat':'-13.163333', 'lng':'-72.545556', 'distance':'2000'}]`\n\n#### Requests by Location\n|  parameter  | sample | default | description | optional |\n|----------|---------|---------|---------|---------|\n| **`locationId`** | `24245` |  | The Instagram `locationId` of a location.\u003cbr\u003eFind Instagram locations [here](http://worldc.am/) | no |\n| **`items`**  | `10` | `20` | Items per request (`0`-`33`) |  yes  |\n\nSample requests:\n* `[{'locationId':'24245', 'items':30}]`\n\n\n### III. Rate limit\nVisit the official [Instagram API documentation](https://www.instagram.com/developer/limits/)\n\n\u003e **The live Rate Limit is 5000 / hour.** Global rate limits are applied inclusive of all API calls made by an app per access token over the 1-hour sliding window, regardless of the particular endpoint. Rate limits also apply to invalid or malformed requests.\n\n# Licence\nMIT\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnnythetank%2Faping-plugin-instagram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnnythetank%2Faping-plugin-instagram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnnythetank%2Faping-plugin-instagram/lists"}