Skip to content

Commit

Permalink
updated to new apiNG structure
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnnyTheTank committed Jan 11, 2016
1 parent 0ee8d4b commit 414c307
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 52 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 Jonathan Hornung
Copyright (c) 2016 Jonathan Hornung

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"authors": [
"Jonathan Hornung <jonathan.hornung@gmail.com>"
],
"version": "0.7.0",
"description": "tumblr plugin for apiNG",
"version": "0.7.6",
"description": "Tumblr plugin for apiNG",
"main": "dist/aping-plugin-tumblr.min.js",
"moduleType": [],
"keywords": [
Expand Down
26 changes: 9 additions & 17 deletions demo/aping-config.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
"use strict";
apingApp.config(['$provide', function ($provide) {

$provide.constant("apingApiKeys", {
tumblr: [
{'api_key':'<YOUR_TUMBLR_API_KEY>'},
],
$provide.value("apingDefaultSettings", {
apingApiKeys : {
//...
tumblr: [
//{'api_key':'<YOUR_TUMBLR_API_KEY>'},
{'api_key':'lINWJaOl0lu3ajBn5tdqJgs8IFisHu5GJ8hBYzR41f4BHEl9E6'},
],
//...
}
});

$provide.constant("apingDefaultSettings", {
templateUrl : "aping_design_blanko.html",
items : 20, //items per request
maxItems: 100, //max items per aping
orderBy : "timestamp",
orderReverse : "true",
model: "social",
getNativeData: false,
removeDoubles: false,
});

}]);
2 changes: 2 additions & 0 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@

<h1>{'page':'camaradakalderra', 'tag':'soccer'}</h1>
<aping
template-url="template.html"
model="image"
items="15"
aping-tumblr="[{'page':'camaradakalderra', 'tag':'soccer'}]">
</aping>
<hr>
<h1>{'page':'namikamusik'}</h1>
<aping
template-url="template.html"
model="image"
aping-tumblr="[{'page':'namikamusik'}]">
</aping>
Expand Down
File renamed without changes.
24 changes: 10 additions & 14 deletions dist/aping-plugin-tumblr.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
@name: aping-plugin-tumblr
@version: 0.7.0 (09-01-2016)
@author: Jonathan Hornung
@url: https://github.com/JohnnyTheTank/apiNG-plugin-tumblr#readme
@version: 0.7.6 (11-01-2016)
@author: Jonathan Hornung <jonathan.hornung@gmail.com>
@url: https://github.com/JohnnyTheTank/apiNG-plugin-tumblr
@license: MIT
*/
"use strict";
Expand All @@ -17,7 +17,7 @@ var jjtApingTumblr = angular.module("jtt_aping_tumblr", ['jtt_tumblr'])

var appSettings = apingController.getAppSettings();

var requests = apingUtilityHelper.parseJsonFromAttributes(attrs.apingTumblr, apingTumblrHelper.getThisPlattformString(), appSettings);
var requests = apingUtilityHelper.parseJsonFromAttributes(attrs.apingTumblr, apingTumblrHelper.getThisPlatformString(), appSettings);

requests.forEach(function (request) {

Expand All @@ -33,7 +33,7 @@ var jjtApingTumblr = angular.module("jtt_aping_tumblr", ['jtt_tumblr'])

//create requestObject for api request call
var requestObject = {
api_key: apingUtilityHelper.getApiCredentials(apingTumblrHelper.getThisPlattformString(), "api_key"),
api_key: apingUtilityHelper.getApiCredentials(apingTumblrHelper.getThisPlatformString(), "api_key"),
filter:"text",

};
Expand All @@ -44,7 +44,7 @@ var jjtApingTumblr = angular.module("jtt_aping_tumblr", ['jtt_tumblr'])
requestObject.limit = appSettings.items;
}

if(requestObject.limit == 0) {
if (requestObject.limit === 0 || requestObject.limit === '0') {
return false;
}

Expand All @@ -62,10 +62,6 @@ var jjtApingTumblr = angular.module("jtt_aping_tumblr", ['jtt_tumblr'])
requestObject.tag = request.tag;
}

if(requestObject.limit == 0) {
return false;
}

if(request.page) {

requestObject.page = request.page;
Expand Down Expand Up @@ -99,7 +95,7 @@ var jjtApingTumblr = angular.module("jtt_aping_tumblr", ['jtt_tumblr'])
}]);;"use strict";

jjtApingTumblr.service('apingTumblrHelper', ['apingModels', 'apingTimeHelper', 'apingUtilityHelper', function (apingModels, apingTimeHelper, apingUtilityHelper) {
this.getThisPlattformString = function () {
this.getThisPlatformString = function () {
return "tumblr";
};

Expand Down Expand Up @@ -243,7 +239,7 @@ jjtApingTumblr.service('apingTumblrHelper', ['apingModels', 'apingTimeHelper', '
};

this.getSocialItemByJsonData = function (_item) {
var socialObject = apingModels.getNew("social", this.getThisPlattformString());
var socialObject = apingModels.getNew("social", this.getThisPlatformString());

//fill _item in socialObject
$.extend(true, socialObject, {
Expand Down Expand Up @@ -319,7 +315,7 @@ jjtApingTumblr.service('apingTumblrHelper', ['apingModels', 'apingTimeHelper', '
};

this.getVideoItemByJsonData = function (_item) {
var videoObject = apingModels.getNew("video", this.getThisPlattformString());
var videoObject = apingModels.getNew("video", this.getThisPlatformString());

//fill _item in videoObject
$.extend(true, videoObject, {
Expand Down Expand Up @@ -349,7 +345,7 @@ jjtApingTumblr.service('apingTumblrHelper', ['apingModels', 'apingTimeHelper', '
};

this.getImageItemByJsonData = function (_item) {
var imageObject = apingModels.getNew("image", this.getThisPlattformString());
var imageObject = apingModels.getNew("image", this.getThisPlatformString());

//fill _item in imageObject
$.extend(true, imageObject, {
Expand Down
8 changes: 4 additions & 4 deletions dist/aping-plugin-tumblr.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "aping-plugin-tumblr",
"version": "0.7.0",
"description": "tumblr plugin for apiNG",
"version": "0.7.6",
"description": "Tumblr plugin for apiNG",
"main": "dist/aping-plugin-tumblr.min.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand All @@ -19,12 +19,12 @@
"json",
"angular"
],
"author": "Jonathan Hornung",
"author": "Jonathan Hornung <jonathan.hornung@gmail.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/JohnnyTheTank/apiNG-plugin-tumblr/issues"
},
"homepage": "https://github.com/JohnnyTheTank/apiNG-plugin-tumblr#readme",
"homepage": "https://github.com/JohnnyTheTank/apiNG-plugin-tumblr",
"devDependencies": {
"grunt": "^0.4.5",
"grunt-contrib-concat": "^0.5.1",
Expand Down
Loading

0 comments on commit 414c307

Please sign in to comment.