{"id":18797131,"url":"https://github.com/johnnythetank/aping-plugin-footballdata","last_synced_at":"2025-04-13T16:31:51.749Z","repository":{"id":57182133,"uuid":"61623573","full_name":"JohnnyTheTank/apiNG-plugin-footballdata","owner":"JohnnyTheTank","description":"football-data.org Plugin for apiNG","archived":false,"fork":false,"pushed_at":"2016-12-23T08:53:43.000Z","size":36,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T22:01:44.403Z","etag":null,"topics":["angular","api","aping","aping-plugin","football","football-data","soccer","wall"],"latest_commit_sha":null,"homepage":"http://plnkr.co/edit/a8Uj8V","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":"2016-06-21T10:07:04.000Z","updated_at":"2016-10-26T12:01:17.000Z","dependencies_parsed_at":"2022-09-03T06:21:46.796Z","dependency_job_id":null,"html_url":"https://github.com/JohnnyTheTank/apiNG-plugin-footballdata","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnnyTheTank%2FapiNG-plugin-footballdata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnnyTheTank%2FapiNG-plugin-footballdata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnnyTheTank%2FapiNG-plugin-footballdata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnnyTheTank%2FapiNG-plugin-footballdata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JohnnyTheTank","download_url":"https://codeload.github.com/JohnnyTheTank/apiNG-plugin-footballdata/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248743851,"owners_count":21154753,"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":["angular","api","aping","aping-plugin","football","football-data","soccer","wall"],"created_at":"2024-11-07T22:07:14.356Z","updated_at":"2025-04-13T16:31:51.418Z","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-footballdata.svg)](https://badge.fury.io/js/aping-plugin-footballdata)\n[![Bower version](https://badge.fury.io/bo/apiNG-plugin-footballdata.svg)](https://badge.fury.io/bo/apiNG-plugin-footballdata)\n\n**_apiNG-plugin-footballdata_** is a [football-data.org API](http://api.football-data.org/index) plugin for [**apiNG**](https://github.com/JohnnyTheTank/apiNG).\n\n# Information\n* **Supported apiNG models: `fbd-team`, `fbd-league`, `fbd-player`, `fbd-fixture`, `fbd-table`**\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-footballdata-api-factory](https://github.com/JohnnyTheTank/angular-footballdata-api-factory) _(included in distribution files)_\n* **[Demo on plnkr](http://plnkr.co/edit/a8Uj8V)**\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. Request\n\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-footballdata --save`\n* `npm install aping-plugin-footballdata --save`\n* use [CDN file](https://www.jsdelivr.com/projects/aping.plugin-footballdata)\n* download [apiNG-plugin-footballdata.zip](https://github.com/JohnnyTheTank/apiNG-plugin-footballdata/zipball/master)\n\n### II. Include file\nInclude `aping-plugin-footballdata.min.js` in your apiNG application\n\n```html\n\u003c!-- when using bower --\u003e\n\u003cscript src=\"bower_components/apiNG-plugin-footballdata/dist/aping-plugin-footballdata.min.js\"\u003e\u003c/script\u003e\n\n\u003c!-- when using npm --\u003e\n\u003cscript src=\"node_modules/aping-plugin-footballdata/dist/aping-plugin-footballdata.min.js\"\u003e\u003c/script\u003e\n\n\u003c!-- when using cdn file --\u003e\n\u003cscript src=\"//cdn.jsdelivr.net/aping.plugin-footballdata/latest/aping-plugin-footballdata.min.js\"\u003e\u003c/script\u003e\n\n\u003c!-- when using downloaded files --\u003e\n\u003cscript src=\"aping-plugin-footballdata.min.js\"\u003e\u003c/script\u003e\n```\n\n### III. Add dependency\nAdd the module `jtt_aping_footballdata` as a dependency to your app module:\n```js\nangular.module('app', ['jtt_aping', 'jtt_aping_footballdata']);\n```\n\n### IV. Add the plugin\nAdd the plugin's directive `aping-footballdata=\"[]\"` to your apiNG directive and [configure your requests](#ii-requests)\n```html\n\u003caping\n    template-url=\"templates/fixture.html\"\n    model=\"fbd-fixture\"\n    aping-footballdata=\"[{'leagueId':394, 'matchday':5}]\"\u003e\n\u003c/aping\u003e\n```\n\n## 2. ACCESS TOKEN\n\n### I. Generate your `api_key`\n- Open [api.football-data.org/register](http://api.football-data.org/register)\n- Type in your name, email address and the usage-question\n- Receive your `api_key` via email\n\n### II. Insert your `api_key` 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            footballdata: [\n                {'api_key':'\u003cYOUR_FOOTBALLDATA_API_KEY\u003e'}\n            ],\n            //...\n        }\n    });\n}]);\n```\n\n:warning: Replace `\u003cYOUR_FOOTBALLDATA_API_KEY\u003e` with your footballdata `api_key`\n\n## 3. USAGE\n\n### I. Models\nSupported apiNG models\n\n|  model   | content | support |\n|----------|---------|---------|\n| `fbd-team` | **teams** from football-data.org | full    |\n| `fbd-league`  | **leagues** from football-data.org | full    |\n| `fbd-player`  | **players** from football-data.org  | full    |\n| `fbd-fixture`  | **fixtures** from football-data.org  | full    |\n| `fbd-table`  | **tables** from football-data.org  | full    |\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#### Request Team by teamId\n|  parameter  | sample | description | optional |\n|----------|---------|---------|---------|---------|\n| **`teamId`** | `5` | footballdata-org id of the team | no |\n| **`protocol`** | `https` | used protocol (`http`, `https`, `auto`) | yes |\n\nSamples:\n* `[{'teamId':'5'}]`\n* `[{'teamId':'18'}, {'teamId':'7'}]`\n\n#### Request Teams by leagueId\n|  parameter  | sample | description | optional |\n|----------|---------|---------|---------|\n| **`leagueId`** | `394` | footballdata-org id of the league | no |\n| **`protocol`** | `https` | used protocol (`http`, `https`, `auto`) | yes |\n\nSamples:\n* `[{'leagueId':'394'}]`\n* `[{'leagueId':'398'}, {'leagueId':'400'}]`\n\n#### Request Players by teamId\n|  parameter  | sample | description | optional |\n|----------|---------|---------|---------|\n| **`teamId`** | `5` | footballdata-org id of the team | no |\n| **`protocol`** | `https` | used protocol (`http`, `https`, `auto`) | yes |\n\nSamples:\n* `[{'teamId':'5'}]`\n* `[{'teamId':'18'}, {'teamId':'7'}]`\n\n#### Request League by id\n|  parameter  | sample | description | optional |\n|----------|---------|---------|---------|\n| **`leagueId`** | `394` | footballdata-org id of the league | no |\n| **`protocol`** | `https` | used protocol (`http`, `https`, `auto`) | yes |\n\nSamples:\n* `[{'leagueId':'394'}]`\n* `[{'leagueId':'398'}, {'leagueId':'400'}]`\n\n#### Request Leagues by year\n|  parameter  | sample | description | optional |\n|----------|---------|---------|---------|\n| **`year`** | `2015` | year of the league. use `$CURRENT` for the current year | no |\n| **`protocol`** | `https` | used protocol (`http`, `https`, `auto`) | yes |\n\nSamples:\n* `[{'year':'2015'}]`\n* `[{'year':'$CURRENT'}, {'year':'2013'}]`\n\n#### Request Table by leagueId\n|  parameter  | sample | description | optional |\n|----------|---------|---------|---------|\n| **`leagueId`** | `394` | footballdata-org id of the league | no |\n| **`matchday`** | `3` | The current/last matchday is taken per default | yes |\n| **`protocol`** | `https` | used protocol (`http`, `https`, `auto`) | yes |\n\nSamples:\n* `[{'leagueId':'394', 'matchday':4}]`\n* `[{'leagueId':'398'}, {'leagueId':'400'}]`\n\n#### Request Fixture by fixtureId\n|  parameter  | sample | description | optional |\n|----------|---------|---------|---------|\n| **`fixtureId`** | `131257` | footballdata-org id of the fixture | no |\n| **`protocol`** | `https` | used protocol (`http`, `https`, `auto`) | yes |\n\nSamples:\n* `[{'fixtureId':'131257'}]`\n* `[{'fixtureId':'131096'}, {'fixtureId':'131089'}]`\n\n#### Request Fixtures by leagueId\n|  parameter  | sample | description | optional |\n|----------|---------|---------|---------|\n| **`leagueId`** | `394` | footballdata-org id of the league | no |\n| **`matchday`** | `3` | The current/last matchday is taken per default | yes |\n| **`timeFrame`** | `p7` | The value of the timeFrame argument must start with either 'p' for past or 'n' for next. It is followed by a number in the range 1-99.  | yes |\n\nSamples:\n* `[{'leagueId':'394', 'matchday':4}]`\n* `[{'leagueId':'398'}, {'leagueId':'400'}]`\n\n#### Request Fixtures by timeFrame\n|  parameter  | sample | description | optional |\n|----------|---------|---------|---------|\n| **`timeFrame`** | `p7` | The value of the timeFrame argument must start with either 'p' for past or 'n' for next. It is followed by a number in the range 1-99.  | no |\n| **`protocol`** | `https` | used protocol (`http`, `https`, `auto`) | yes |\n\nSample:\n* `[{'timeFrame':'p7'}]`\n\n#### Request Fixtures by teamId\n|  parameter  | sample | description | optional |\n|----------|---------|---------|---------|\n| **`teamId`** | `394` | footballdata-org id of the team | no |\n| **`timeFrame`** | `p7` | The value of the timeFrame argument must start with either 'p' for past or 'n' for next. It is followed by a number in the range 1-99.  | yes |\n| **`venue`** | `home` | Valid values: `home` and `away`. Default is unset. | yes |\n| **`protocol`** | `https` | used protocol (`http`, `https`, `auto`) | yes |\n\nSamples:\n* `[{'teamId':'5', 'timeFrame':'p8', 'venue':'home'}]`\n* `[{'teamId':'18'}, {'teamId':'7'}]`\n\n# Licence\nMIT\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnnythetank%2Faping-plugin-footballdata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnnythetank%2Faping-plugin-footballdata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnnythetank%2Faping-plugin-footballdata/lists"}