Skip to content

Commit 6bcbb8b

Browse files
committed
updated to new apiNG structure
1 parent 85339a4 commit 6bcbb8b

7 files changed

Lines changed: 30 additions & 36 deletions

File tree

README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,19 +76,17 @@ Add the plugin's directive `aping-codebird="[]"` to your apiNG directive and [co
7676
- OR just use this simple generator: https://gearside.com/nebula/documentation/utilities/twitter-bearer-token-generator/
7777

7878
### II. Insert your `bearer_token` into `aping-config.js`
79-
Open `js/apiNG/aping-config.js` in your application folder. It should be look like this snippet:
79+
Create and open `js/apiNG/aping-config.js` in your application folder. It should be look like this snippet:
8080
```js
8181
apingApp.config(['$provide', function ($provide) {
82-
$provide.constant("apingApiKeys", {
83-
//...
84-
twitter: [
85-
{'bearer_token':"<YOUR_TWITTER_BEARER_TOKEN>"},
86-
],
87-
//...
88-
});
89-
90-
$provide.constant("apingDefaultSettings", {
91-
//...
82+
$provide.value("apingDefaultSettings", {
83+
apingApiKeys : {
84+
//...
85+
bandsintown: [
86+
{'app_id':'<YOUR_BANDSINTOWN_APP_ID>'}
87+
],
88+
//...
89+
}
9290
});
9391
}]);
9492
```

demo/aping-config.js

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,12 @@
11
"use strict";
22
apingApp.config(['$provide', function ($provide) {
3-
4-
$provide.constant("apingApiKeys", {
5-
twitter: [
6-
{'bearer_token':'<YOUR_TWITTER_BEARER_TOKEN>'},
7-
],
3+
$provide.value("apingDefaultSettings", {
4+
apingApiKeys: {
5+
//...
6+
twitter: [
7+
{'bearer_token':'<YOUR_TWITTER_BEARER_TOKEN>'},
8+
],
9+
//...
10+
}
811
});
9-
10-
$provide.constant("apingDefaultSettings", {
11-
templateUrl : "aping_design_sample.html",
12-
items : 5, //items per request
13-
maxItems: 100, //max items per aping
14-
orderBy : "timestamp",
15-
orderReverse : "true",
16-
model: "social",
17-
getNativeData: false,
18-
});
19-
20-
}]);
12+
}]);

demo/index.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,17 @@
1313
</head>
1414
<body ng-app="app">
1515
<h1>{'search':'münchen', 'result_type':'recent', 'language':'de'}</h1>
16-
<aping model="image" aping-codebird="[{'search':'münchen', 'result_type':'recent', 'language':'de', 'items':20}]"></aping>
16+
<aping
17+
template-url="template.html"
18+
model="image"
19+
aping-codebird="[{'search':'münchen', 'result_type':'recent', 'language':'de', 'items':20}]">
20+
</aping>
1721
<hr>
1822
<h1>{'search':'münchen', 'result_type':'recent', 'lat':'48.1374300', 'lng':'11.5754900', 'distance':5}</h1>
19-
<aping model="social" aping-codebird="[{'search':'münchen', 'result_type':'recent', 'lat':'48.1374300', 'lng':'11.5754900', 'distance':5}]"></aping>
23+
<aping template-url="template.html" model="social" aping-codebird="[{'search':'münchen', 'result_type':'recent', 'lat':'48.1374300', 'lng':'11.5754900', 'distance':5}]"></aping>
2024
<hr>
2125
<h1>{'user':'passy', 'showAvatar':false, 'exclude_replies':true, 'include_rts':false}</h1>
22-
<aping model="social" aping-codebird="[{'user':'passy', 'showAvatar':false, 'exclude_replies':false, 'include_rts':false, 'items':30}]"></aping>
26+
<aping template-url="template.html" model="social" aping-codebird="[{'user':'passy', 'showAvatar':false, 'exclude_replies':false, 'include_rts':false, 'items':30}]"></aping>
2327

2428
</body>
2529
</html>

dist/aping-plugin-codebird.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
@name: aping-plugin-codebird
3-
@version: 0.7.5 (10-01-2016)
3+
@version: 0.7.5 (11-01-2016)
44
@author: Jonathan Hornung <jonathan.hornung@gmail.com>
55
@url: https://github.com/JohnnyTheTank/apiNG-plugin-codebird
66
@license: MIT
@@ -44,7 +44,7 @@ var jjtApingCodebird = angular.module("jtt_aping_codebird", [])
4444
requestObject.count = appSettings.items;
4545
}
4646

47-
if (requestObject.count == 0) {
47+
if (requestObject.count === 0 || requestObject.count === '0') {
4848
return false;
4949
}
5050

dist/aping-plugin-codebird.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/aping-codebird-directive.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ var jjtApingCodebird = angular.module("jtt_aping_codebird", [])
3737
requestObject.count = appSettings.items;
3838
}
3939

40-
if (requestObject.count == 0) {
40+
if (requestObject.count === 0 || requestObject.count === '0') {
4141
return false;
4242
}
4343

0 commit comments

Comments
 (0)