From e1d04908bd0f413b027f665055de2920cacdd3b6 Mon Sep 17 00:00:00 2001 From: olalacrelou Date: Mon, 19 Dec 2016 19:17:22 -0200 Subject: [PATCH] removing 'http:' from url --- dist/angular-footballdata-api-factory.js | 4 ++-- dist/angular-footballdata-api-factory.min.js | 4 ++-- src/angular-footballdata-api-factory.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dist/angular-footballdata-api-factory.js b/dist/angular-footballdata-api-factory.js index 18eb862..4ed9072 100644 --- a/dist/angular-footballdata-api-factory.js +++ b/dist/angular-footballdata-api-factory.js @@ -1,6 +1,6 @@ /** @name: angular-footballdata-api-factory - @version: 0.2.0 (24-06-2016) + @version: 0.2.0 (19-12-2016) @author: Jonathan Hornung @url: https://github.com/JohnnyTheTank/angular-footballdata-api-factory#readme @license: MIT @@ -156,7 +156,7 @@ angular.module("jtt_footballdata", []) }]) .service('footballdataSearchDataService', function () { this.getApiBaseUrl = function () { - return 'http://api.football-data.org/v1/'; + return '//api.football-data.org/v1/'; }; this.fillDataInObjectByList = function (_object, _params, _list) { diff --git a/dist/angular-footballdata-api-factory.min.js b/dist/angular-footballdata-api-factory.min.js index d765937..ec7dfbf 100644 --- a/dist/angular-footballdata-api-factory.min.js +++ b/dist/angular-footballdata-api-factory.min.js @@ -1,8 +1,8 @@ /** @name: angular-footballdata-api-factory - @version: 0.2.0 (24-06-2016) + @version: 0.2.0 (19-12-2016) @author: Jonathan Hornung @url: https://github.com/JohnnyTheTank/angular-footballdata-api-factory#readme @license: MIT */ -"use strict";angular.module("jtt_footballdata",[]).factory("footballdataFactory",["$http","footballdataSearchDataService",function(a,b){var c={};return c.getSeasons=function(c){var d=b.getNew("getSeasons",c);return a({method:"GET",url:d.url,params:d.object,headers:{"X-Auth-Token":c.apiKey}})},c.getSeason=function(c){var d=b.getNew("getSeason",c);return a({method:"GET",url:d.url,params:d.object,headers:{"X-Auth-Token":c.apiKey}})},c.getTeam=function(c){var d=b.getNew("getTeam",c);return a({method:"GET",url:d.url,params:d.object,headers:{"X-Auth-Token":c.apiKey?c.apiKey:apiKey}})},c.getPlayersByTeam=function(c){var d=b.getNew("getPlayersByTeam",c);return a({method:"GET",url:d.url,params:d.object,headers:{"X-Auth-Token":c.apiKey?c.apiKey:apiKey}})},c.getFixtures=function(c){var d=b.getNew("getFixtures",c);return a({method:"GET",url:d.url,params:d.object,headers:{"X-Auth-Token":c.apiKey?c.apiKey:apiKey}})},c.getFixture=function(c){var d=b.getNew("getFixture",c);return a({method:"GET",url:d.url,params:d.object,headers:{"X-Auth-Token":c.apiKey?c.apiKey:apiKey}})},c.getFixturesByTeam=function(c){var d=b.getNew("getFixturesByTeam",c);return a({method:"GET",url:d.url,params:d.object,headers:{"X-Auth-Token":c.apiKey?c.apiKey:apiKey}})},c.getTeamsBySeason=function(c){var d=b.getNew("getTeamsBySeason",c);return a({method:"GET",url:d.url,params:d.object,headers:{"X-Auth-Token":c.apiKey?c.apiKey:apiKey}})},c.getLeagueTableBySeason=function(c){var d=b.getNew("getLeagueTableBySeason",c);return a({method:"GET",url:d.url,params:d.object,headers:{"X-Auth-Token":c.apiKey?c.apiKey:apiKey}})},c.getFixturesBySeason=function(c){var d=b.getNew("getFixturesBySeason",c);return a({method:"GET",url:d.url,params:d.object,headers:{"X-Auth-Token":c.apiKey?c.apiKey:apiKey}})},c}]).service("footballdataSearchDataService",function(){this.getApiBaseUrl=function(){return"http://api.football-data.org/v1/"},this.fillDataInObjectByList=function(a,b,c){return angular.forEach(c,function(c,d){angular.isDefined(b[c])&&(a.object[c]=b[c])}),a},this.getNew=function(a,b){var c={object:{},url:""};switch(a){case"getSeasons":c=this.fillDataInObjectByList(c,b,["apiKey","season"]),c.url=this.getApiBaseUrl()+"soccerseasons/";break;case"getSeason":c=this.fillDataInObjectByList(c,b,["apiKey"]),c.url=this.getApiBaseUrl()+"soccerseasons/"+b.id;break;case"getTeam":c=this.fillDataInObjectByList(c,b,["apiKey"]),c.url=this.getApiBaseUrl()+"teams/"+b.id;break;case"getPlayersByTeam":c=this.fillDataInObjectByList(c,b,["apiKey"]),c.url=this.getApiBaseUrl()+"teams/"+b.id+"/players";break;case"getFixtures":c=this.fillDataInObjectByList(c,b,["apiKey","league","timeFrame"]),c.url=this.getApiBaseUrl()+"/fixtures";break;case"getFixture":c=this.fillDataInObjectByList(c,b,["apiKey","head2head"]),c.url=this.getApiBaseUrl()+"/fixtures/"+b.id;break;case"getTeamsBySeason":c=this.fillDataInObjectByList(c,b,[]),c.url=this.getApiBaseUrl()+"soccerseasons/"+b.id+"/teams";break;case"getLeagueTableBySeason":c=this.fillDataInObjectByList(c,b,["apiKey","matchday"]),c.url=this.getApiBaseUrl()+"soccerseasons/"+b.id+"/leagueTable";break;case"getFixturesBySeason":c=this.fillDataInObjectByList(c,b,["apiKey","matchday","timeFrame"]),c.url=this.getApiBaseUrl()+"soccerseasons/"+b.id+"/fixtures";break;case"getFixturesByTeam":c=this.fillDataInObjectByList(c,b,["apiKey","season","timeFrame","venue"]),c.url=this.getApiBaseUrl()+"/teams/"+b.id+"/fixtures"}return c}}); \ No newline at end of file +"use strict";angular.module("jtt_footballdata",[]).factory("footballdataFactory",["$http","footballdataSearchDataService",function(a,b){var c={};return c.getSeasons=function(c){var d=b.getNew("getSeasons",c);return a({method:"GET",url:d.url,params:d.object,headers:{"X-Auth-Token":c.apiKey}})},c.getSeason=function(c){var d=b.getNew("getSeason",c);return a({method:"GET",url:d.url,params:d.object,headers:{"X-Auth-Token":c.apiKey}})},c.getTeam=function(c){var d=b.getNew("getTeam",c);return a({method:"GET",url:d.url,params:d.object,headers:{"X-Auth-Token":c.apiKey?c.apiKey:apiKey}})},c.getPlayersByTeam=function(c){var d=b.getNew("getPlayersByTeam",c);return a({method:"GET",url:d.url,params:d.object,headers:{"X-Auth-Token":c.apiKey?c.apiKey:apiKey}})},c.getFixtures=function(c){var d=b.getNew("getFixtures",c);return a({method:"GET",url:d.url,params:d.object,headers:{"X-Auth-Token":c.apiKey?c.apiKey:apiKey}})},c.getFixture=function(c){var d=b.getNew("getFixture",c);return a({method:"GET",url:d.url,params:d.object,headers:{"X-Auth-Token":c.apiKey?c.apiKey:apiKey}})},c.getFixturesByTeam=function(c){var d=b.getNew("getFixturesByTeam",c);return a({method:"GET",url:d.url,params:d.object,headers:{"X-Auth-Token":c.apiKey?c.apiKey:apiKey}})},c.getTeamsBySeason=function(c){var d=b.getNew("getTeamsBySeason",c);return a({method:"GET",url:d.url,params:d.object,headers:{"X-Auth-Token":c.apiKey?c.apiKey:apiKey}})},c.getLeagueTableBySeason=function(c){var d=b.getNew("getLeagueTableBySeason",c);return a({method:"GET",url:d.url,params:d.object,headers:{"X-Auth-Token":c.apiKey?c.apiKey:apiKey}})},c.getFixturesBySeason=function(c){var d=b.getNew("getFixturesBySeason",c);return a({method:"GET",url:d.url,params:d.object,headers:{"X-Auth-Token":c.apiKey?c.apiKey:apiKey}})},c}]).service("footballdataSearchDataService",function(){this.getApiBaseUrl=function(){return"//api.football-data.org/v1/"},this.fillDataInObjectByList=function(a,b,c){return angular.forEach(c,function(c,d){angular.isDefined(b[c])&&(a.object[c]=b[c])}),a},this.getNew=function(a,b){var c={object:{},url:""};switch(a){case"getSeasons":c=this.fillDataInObjectByList(c,b,["apiKey","season"]),c.url=this.getApiBaseUrl()+"soccerseasons/";break;case"getSeason":c=this.fillDataInObjectByList(c,b,["apiKey"]),c.url=this.getApiBaseUrl()+"soccerseasons/"+b.id;break;case"getTeam":c=this.fillDataInObjectByList(c,b,["apiKey"]),c.url=this.getApiBaseUrl()+"teams/"+b.id;break;case"getPlayersByTeam":c=this.fillDataInObjectByList(c,b,["apiKey"]),c.url=this.getApiBaseUrl()+"teams/"+b.id+"/players";break;case"getFixtures":c=this.fillDataInObjectByList(c,b,["apiKey","league","timeFrame"]),c.url=this.getApiBaseUrl()+"/fixtures";break;case"getFixture":c=this.fillDataInObjectByList(c,b,["apiKey","head2head"]),c.url=this.getApiBaseUrl()+"/fixtures/"+b.id;break;case"getTeamsBySeason":c=this.fillDataInObjectByList(c,b,[]),c.url=this.getApiBaseUrl()+"soccerseasons/"+b.id+"/teams";break;case"getLeagueTableBySeason":c=this.fillDataInObjectByList(c,b,["apiKey","matchday"]),c.url=this.getApiBaseUrl()+"soccerseasons/"+b.id+"/leagueTable";break;case"getFixturesBySeason":c=this.fillDataInObjectByList(c,b,["apiKey","matchday","timeFrame"]),c.url=this.getApiBaseUrl()+"soccerseasons/"+b.id+"/fixtures";break;case"getFixturesByTeam":c=this.fillDataInObjectByList(c,b,["apiKey","season","timeFrame","venue"]),c.url=this.getApiBaseUrl()+"/teams/"+b.id+"/fixtures"}return c}}); \ No newline at end of file diff --git a/src/angular-footballdata-api-factory.js b/src/angular-footballdata-api-factory.js index 459540e..bb13cc7 100644 --- a/src/angular-footballdata-api-factory.js +++ b/src/angular-footballdata-api-factory.js @@ -149,7 +149,7 @@ angular.module("jtt_footballdata", []) }]) .service('footballdataSearchDataService', function () { this.getApiBaseUrl = function () { - return 'http://api.football-data.org/v1/'; + return '//api.football-data.org/v1/'; }; this.fillDataInObjectByList = function (_object, _params, _list) {