{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","params":[],"results":{"codes":[]},"settings":""},"next":{"description":"","pages":[]},"title":"Advanced Usage","type":"basic","slug":"advanced","excerpt":"","body":"**By combining the basic and advanced features, apiNG turns into a rocket.** It's nothing less than an extendable platform, where users can collaborate to create new plugins and designs.\n[block:callout]\n{\n \"type\": \"success\",\n \"body\": \"Social Wall: http://plnkr.co/edit/dz3Dru?p=preview\",\n \"title\": \"Plnklr demo (view & edit)\"\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Table of Content\"\n}\n[/block]\n* **[Components](#components)**\n* **[Credential Manager](#credential-manager)**\n* **[Parameters](#parameters)** \n<br>\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Components\"\n}\n[/block]\nBy using this **components**, you are able to use and create re-usable modules for your work with AngularJS.\n \n## Plugins\n**[apiNG Plugins](plugins) work as data sources for specific platforms or protocols** (e.g. Facebook, Youtube, RSS, GitHub, ...)\n* Plugins are easy to configure\n* Plugins could return data in two ways:\n 1. as **native** data\n 2. as **converted** data, transformed into several universal data _models_ (e.g. for images, videos, events, ...)\n* Use **[existing plugins](all-plugins)** \n* [Create your own plugin](plugins#create-new-aping-plugins)\n\n## Models\n**[apiNG Models](models) are universal data models** (e.g. for images, videos, events, social media, ...)\n* Models could be created or changed, just by doing it.\n\n## Designs\n**[apiNG Designs](designs) are templates to display specific _models_**\n* Use [existing designs](all-designs) \n* [Create your own design](designs)\n\n<br>\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Credential Manager\"\n}\n[/block]\nThe **credential manager** is a functionality of apiNG, written to relieve working with plugins, if they have to deal with api keys, access tokens, and other credentials.\n\n:fa-key: **Copy & paste your credentials for your requests into the [config file](configuration)**. You can store this config file on your webspace and re-use this credentials for some projects.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"apingApiKeys: {\\n youtube : [{'apiKey': '<YOUR_YOUTUBE_API_KEY>'}],\\n facebook: [{'access_token': '<YOUR_FACEBOOK_TOKEN>'}],\\n twitter: [{'bearer_token': '<YOUR_TWITTER_BEARER_TOKEN>'}],\\n vimeo: [{'access_token': '<YOUR_VIMEO_TOKEN>'}],\\n tumblr: [{'api_key': '<YOUR_TUMBLR_API_KEY>'}],\\n // ...\\n}\",\n \"language\": \"javascript\"\n }\n ]\n}\n[/block]\n<hr>:fa-key: **Every plugin could be authorized with a credential object:**\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"apingApiKeys: {\\n instagram : [{\\n 'api_key': '<YOUR_API_KEY>',\\n 'client_id': '<YOUR_CLIENT_ID>'\\n }],\\n // ...\\n}\",\n \"language\": \"javascript\"\n }\n ]\n}\n[/block]\n<hr>:fa-key: **You can store multiple credentials objects _per plugin_ to bypass rate limitations.** The used credential object will get chosen randomly.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"apingApiKeys: {\\n facebook : [\\n { 'access_token': '<YOUR_ACCESS_TOKEN_1>'},\\n { 'access_token': '<YOUR_ACCESS_TOKEN_2>'},\\n { 'access_token': '<YOUR_ACCESS_TOKEN_3>'},\\n { 'access_token': '<YOUR_ACCESS_TOKEN_4>'}\\n ],\\n // ...\\n}\",\n \"language\": \"javascript\"\n }\n ]\n}\n[/block]\n<br>\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Parameters\"\n}\n[/block]\nFor advanced usage, there are two additional parameters for apiNG (bold):\n[block:parameters]\n{\n \"data\": {\n \"0-0\": \"`template-url`\",\n \"h-0\": \"Attribute\",\n \"h-1\": \"Type\",\n \"h-2\": \"Sample\",\n \"h-3\": \"Description\",\n \"h-4\": \"Opt.\",\n \"0-1\": \"`string`\",\n \"0-2\": \"`template.html`\",\n \"0-3\": \"Path to template file.\\nUse result data in template with `{{results}}`\",\n \"0-4\": \"**no**\",\n \"1-0\": \"**`model`**\",\n \"1-1\": \"**`string`**\",\n \"1-2\": \"**`social`**\",\n \"1-3\": \"**Chosen data model for this _apiNG instance_**\",\n \"1-4\": \"yes\",\n \"2-0\": \"**`get-native-data`**\",\n \"2-1\": \"**`boolean`**\",\n \"2-2\": \"**`false`**\",\n \"2-3\": \"**Use `true` for getting native data from plugins.\\nDefault value:`false`**\",\n \"2-4\": \"yes\",\n \"3-0\": \"`items`\",\n \"3-1\": \"`int`\",\n \"3-2\": \"`20`\",\n \"3-3\": \"Number of displayed items per request\",\n \"3-4\": \"yes\",\n \"4-0\": \"`max-items`\",\n \"4-1\": \"`int`\",\n \"4-2\": \"`100`\",\n \"4-3\": \"Number of items of this apiNG instance.\\nUse `-1` for no limitation\",\n \"4-4\": \"yes\",\n \"5-0\": \"`order-by`\",\n \"5-1\": \"`string`\",\n \"5-2\": \"`timestamp`\",\n \"5-3\": \"Order result by this attribute.\\nUse `$NONE` for no order.\\nUse `$RANDOM` for random order\",\n \"5-4\": \"yes\",\n \"6-0\": \"`order-reverse`\",\n \"6-1\": \"`boolean`\",\n \"6-2\": \"`false`\",\n \"6-3\": \"Use `true` for reverse order.\\nDefault value: `false`\",\n \"6-4\": \"yes\",\n \"9-0\": \"`remove-doubles`\",\n \"9-1\": \"`boolean`\",\n \"9-2\": \"`false`\",\n \"9-3\": \"Use `true` to remove identical objects\\nor with the same ID (`id-by`).\\nGets ignored if `merge-doubles` is set.\\nDefault value: `false`\",\n \"9-4\": \"yes\",\n \"10-0\": \"`payload-json`\",\n \"10-1\": \"`json object`\",\n \"10-2\": \"`{'key1':'value1'}`\",\n \"10-3\": \"Inject additional payload data into your template.\\nUse payload data in template with `{{payload}}`\",\n \"10-4\": \"yes\",\n \"11-0\": \"`value-name`\",\n \"11-1\": \"`string`\",\n \"11-2\": \"`videos`\",\n \"11-3\": \"Inject `apingResults` into your app. [(Plnkr)](http://plnkr.co/edit/cziMAy?p=preview)\\nAccess the results with `apingResults.valueName`\",\n \"7-0\": \"`id-by`\",\n \"8-0\": \"`merge-doubles`\",\n \"7-1\": \"`string` or `json array`\",\n \"8-1\": \"`boolean`\",\n \"8-2\": \"`false`\",\n \"7-2\": \"`intern_id`\\n`['name','date']`\\n`['user.0','user.1']`\",\n \"7-3\": \"Create id for each item by this properties.\\nProperty name: `aping_id`\",\n \"8-3\": \"Use `true` to merge objects with the same ID.\\nWorks only with `id-by`\\nDefault value: `false`\",\n \"12-0\": \"`result-property`\",\n \"12-1\": \"`string`\",\n \"12-2\": \"`events`\",\n \"12-3\": \"Change the `result-property` to set the \\n`$scope` property that will contain the results.\\nDefault value: `results`\"\n },\n \"cols\": 4,\n \"rows\": 13\n}\n[/block]\n<br>\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"Work in progress\",\n \"body\": \"This page is under construction\"\n}\n[/block]","updates":[],"order":6,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5770617ad7c6cd1900a57e7a","project":"56830b883b87430d00483b3d","user":"56830b4870331a0d00484a77","__v":1,"category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Documentation","slug":"documentation","order":1,"from_sync":false,"reference":false,"_id":"57706179d7c6cd1900a57e70","version":"57706179d7c6cd1900a57e6e","__v":0,"project":"56830b883b87430d00483b3d","createdAt":"2015-12-29T22:39:05.596Z"},"createdAt":"2016-01-12T15:30:55.550Z","githubsync":"","version":{"version":"1","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["57706179d7c6cd1900a57e6f","57706179d7c6cd1900a57e70","57706179d7c6cd1900a57e71","57706179d7c6cd1900a57e72","57706179d7c6cd1900a57e73","57706179d7c6cd1900a57e74"],"_id":"57706179d7c6cd1900a57e6e","project":"56830b883b87430d00483b3d","__v":1,"createdAt":"2016-06-26T23:12:57.873Z","releaseDate":"2016-06-26T23:12:57.873Z"}}