From be3806edf0a63fd0216c05cfd2e04366d0c7a8f5 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 9 Nov 2015 08:33:38 -0600 Subject: [PATCH 1/4] no message --- Board.gs | 93 ++++++++++++++++++++++++++++++++++++++++++++------- README.md | 9 +++-- boardPrefs.gs | 44 ++++++++++++++++++++++++ 3 files changed, 130 insertions(+), 16 deletions(-) create mode 100644 boardPrefs.gs diff --git a/Board.gs b/Board.gs index 4748f92..a8e247e 100644 --- a/Board.gs +++ b/Board.gs @@ -1,20 +1,87 @@ /** * @classdesc - * This class defines an Trello Organization. + * This class defines an Trello Board. * @constructor */ function Board() { - /** - * @returns {string} The id of this Segment - */ - Board.prototype.getName = function() { - return this.wrapped.name; - } - - Board.prototype.getId = function() { - return this.wrapped.id; - } - -} // Board + /** + * @returns {string} The id of this Segment + */ + Board.prototype.getId = function () { + return this.wrapped.id; + } + + /** + * @returns {string} The name of this board + */ + Board.prototype.getName = function () { + return this.wrapped.name; + } + + /** + * @returns {string} The brief description of this board + */ + Board.prototype.getDescription = function () { + return this.wrapped.desc; + } + + /** + * @returns {string} The description data for this board + */ + Board.prototype.getDescriptionData = function () { + return this.wrapped.descData; + } + + /** + * @returns {boolean} Is this board closed or not? + */ + Board.prototype.isClosed = function () { + return this.wrapped.closed; + } + + /** + * @returns {string} The ID of the organization this board is in + */ + Board.prototype.getOrganizationID = function () { + return this.wrapped.idOrganization; + } + + /** + * @returns {boolean} Has this board been 'starred'? + */ + Board.prototype.isFavorited = function () { + return this.wrapped.pinned; + } + + /** + * @returns {string} The url of this board + */ + Board.prototype.getURL = function () { + return this.wrapped.url; + } + + /** + * @returns {string} The short url of this board + */ + Board.prototype.getShortURL = function () { + return this.wrapped.shortUrl; + } + + /** + * @returns {array} The preferences for this board + */ + Board.prototype.getPrefs = function () { + return this.wrapped.prefs; + } + + /** + * @returns {array} The labels for this board + */ + Board.prototype.getLabels = function () { + return this.wrapped.labelNames; + } + + +} // Board \ No newline at end of file diff --git a/README.md b/README.md index 7e3cbe4..215299f 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,17 @@ # GAS-TrelloApp Google Apps Script library for using the [Trello RESTful API] (https://developers.trello.com/advanced-reference). -At the moment it provides: +It currently has on-going development in these areas: * authorization/authentication -* listing of organisations and boards +* object-oriented approach to Trello 'objects' + +It currently can be used to: +* authorize / authenticate users * getting a list id * creation of new cards in an existing board -You can use the TrelloApp library in you code by using the ID: **MOXamiHNCH44xpQh9H7FTudnfWGfgtIUb**. +You can use the TrelloApp library in your code by using the ID: **MOXamiHNCH44xpQh9H7FTudnfWGfgtIUb**. Here's an example of using it to create a new card: diff --git a/boardPrefs.gs b/boardPrefs.gs new file mode 100644 index 0000000..1eb7322 --- /dev/null +++ b/boardPrefs.gs @@ -0,0 +1,44 @@ +/** + * @classdesc + * This class defines the Preferences that can be set on a Board. + * @constructor + */ + +function boardPrefs() { + + /** + * @return {string} The premission level of this board + */ + boardPrefs.prototype.getPermissionLevel = function () { + return this.wrapped.permissionLevel; + } + + /** + * @return {string} The voting level of this board + */ + boardPrefs.prototype.getVotingLevel = function () { + return this.wrapped.voting; + } + + /** + * @return {string} The comments level of this board + */ + boardPrefs.prototype.getCommentsLevel = function () { + return this.wrapped.comments; + } + + /** + * @return {string} The invitations level of this board + */ + boardPrefs.prototype.getInvitationLevel = function () { + return this.wrapped.invitations; + } + + /** + * @return {boolean} Can this board be joined without an invitation? + */ + boardPrefs.prototype.isMembershipOpen = function () { + return this.wrapped.selfJoin; + } + +} // Board Preferences \ No newline at end of file From c324f33d441dd8f0d11be052b45ee8b7583540b5 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 9 Nov 2015 08:39:46 -0600 Subject: [PATCH 2/4] Adding additional board options to expand upon the board object. Modified the README for clarity. Redirected focus in case my Fork becomes a separate project if originator doesn't approve. Added the boardPrefs object so that Board Preferences could be handled separately. --- Board.gs | 93 ++++++++++++++++++++++++++++++++++++++++++++------- README.md | 9 +++-- boardPrefs.gs | 44 ++++++++++++++++++++++++ 3 files changed, 130 insertions(+), 16 deletions(-) create mode 100644 boardPrefs.gs diff --git a/Board.gs b/Board.gs index 4748f92..a8e247e 100644 --- a/Board.gs +++ b/Board.gs @@ -1,20 +1,87 @@ /** * @classdesc - * This class defines an Trello Organization. + * This class defines an Trello Board. * @constructor */ function Board() { - /** - * @returns {string} The id of this Segment - */ - Board.prototype.getName = function() { - return this.wrapped.name; - } - - Board.prototype.getId = function() { - return this.wrapped.id; - } - -} // Board + /** + * @returns {string} The id of this Segment + */ + Board.prototype.getId = function () { + return this.wrapped.id; + } + + /** + * @returns {string} The name of this board + */ + Board.prototype.getName = function () { + return this.wrapped.name; + } + + /** + * @returns {string} The brief description of this board + */ + Board.prototype.getDescription = function () { + return this.wrapped.desc; + } + + /** + * @returns {string} The description data for this board + */ + Board.prototype.getDescriptionData = function () { + return this.wrapped.descData; + } + + /** + * @returns {boolean} Is this board closed or not? + */ + Board.prototype.isClosed = function () { + return this.wrapped.closed; + } + + /** + * @returns {string} The ID of the organization this board is in + */ + Board.prototype.getOrganizationID = function () { + return this.wrapped.idOrganization; + } + + /** + * @returns {boolean} Has this board been 'starred'? + */ + Board.prototype.isFavorited = function () { + return this.wrapped.pinned; + } + + /** + * @returns {string} The url of this board + */ + Board.prototype.getURL = function () { + return this.wrapped.url; + } + + /** + * @returns {string} The short url of this board + */ + Board.prototype.getShortURL = function () { + return this.wrapped.shortUrl; + } + + /** + * @returns {array} The preferences for this board + */ + Board.prototype.getPrefs = function () { + return this.wrapped.prefs; + } + + /** + * @returns {array} The labels for this board + */ + Board.prototype.getLabels = function () { + return this.wrapped.labelNames; + } + + +} // Board \ No newline at end of file diff --git a/README.md b/README.md index 7e3cbe4..215299f 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,17 @@ # GAS-TrelloApp Google Apps Script library for using the [Trello RESTful API] (https://developers.trello.com/advanced-reference). -At the moment it provides: +It currently has on-going development in these areas: * authorization/authentication -* listing of organisations and boards +* object-oriented approach to Trello 'objects' + +It currently can be used to: +* authorize / authenticate users * getting a list id * creation of new cards in an existing board -You can use the TrelloApp library in you code by using the ID: **MOXamiHNCH44xpQh9H7FTudnfWGfgtIUb**. +You can use the TrelloApp library in your code by using the ID: **MOXamiHNCH44xpQh9H7FTudnfWGfgtIUb**. Here's an example of using it to create a new card: diff --git a/boardPrefs.gs b/boardPrefs.gs new file mode 100644 index 0000000..1eb7322 --- /dev/null +++ b/boardPrefs.gs @@ -0,0 +1,44 @@ +/** + * @classdesc + * This class defines the Preferences that can be set on a Board. + * @constructor + */ + +function boardPrefs() { + + /** + * @return {string} The premission level of this board + */ + boardPrefs.prototype.getPermissionLevel = function () { + return this.wrapped.permissionLevel; + } + + /** + * @return {string} The voting level of this board + */ + boardPrefs.prototype.getVotingLevel = function () { + return this.wrapped.voting; + } + + /** + * @return {string} The comments level of this board + */ + boardPrefs.prototype.getCommentsLevel = function () { + return this.wrapped.comments; + } + + /** + * @return {string} The invitations level of this board + */ + boardPrefs.prototype.getInvitationLevel = function () { + return this.wrapped.invitations; + } + + /** + * @return {boolean} Can this board be joined without an invitation? + */ + boardPrefs.prototype.isMembershipOpen = function () { + return this.wrapped.selfJoin; + } + +} // Board Preferences \ No newline at end of file From d433765c01f4c24667611b89558727fbbaad2293 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 16 Nov 2015 16:14:52 -0600 Subject: [PATCH 3/4] 2nd attempt to create first commit. --- Authorizer.gs | 109 ---------------------- NOTES.md | 14 +++ OAuth1/Authorizer.gs | 103 ++++++++++++++++++++ README.md | 7 +- Api.gs => Trello/Api.gs | 3 +- App.gs => Trello/App.gs | 20 ++-- Board.gs => Trello/Board.gs | 2 +- List.gs => Trello/List.gs | 0 Organization.gs => Trello/Organization.gs | 0 TrelloApp.gs => Trello/TrelloApp.gs | 0 Wrapper.gs => Trello/Wrapper.gs | 1 - boardPrefs.gs => Trello/boardPrefs.gs | 2 +- Authorised.html => html/Authorised.html | 0 Authorize.html => html/Authorize.html | 0 Config.gs => settings/Config.gs | 0 Utils.gs => settings/Utils.gs | 0 Tests.gs => testing/Tests.gs | 0 17 files changed, 134 insertions(+), 127 deletions(-) delete mode 100644 Authorizer.gs create mode 100644 NOTES.md create mode 100644 OAuth1/Authorizer.gs rename Api.gs => Trello/Api.gs (98%) rename App.gs => Trello/App.gs (87%) rename Board.gs => Trello/Board.gs (99%) rename List.gs => Trello/List.gs (100%) rename Organization.gs => Trello/Organization.gs (100%) rename TrelloApp.gs => Trello/TrelloApp.gs (100%) rename Wrapper.gs => Trello/Wrapper.gs (99%) rename boardPrefs.gs => Trello/boardPrefs.gs (97%) rename Authorised.html => html/Authorised.html (100%) rename Authorize.html => html/Authorize.html (100%) rename Config.gs => settings/Config.gs (100%) rename Utils.gs => settings/Utils.gs (100%) rename Tests.gs => testing/Tests.gs (100%) diff --git a/Authorizer.gs b/Authorizer.gs deleted file mode 100644 index 68d34fc..0000000 --- a/Authorizer.gs +++ /dev/null @@ -1,109 +0,0 @@ -// 34567890123456789012345678901234567890123456789012345678901234567890123456789 - -// JSHint - TODO -/* jshint asi: true */ - -// Authorizer.gs -// ============= -// -// This object provides the autorization methods - -var Authorizer_ = { - - /** - * - */ - - getTrelloService: function() { - - var service = OAuth1.createService(OAUTH_SERVICE_NAME); - service.setAccessTokenUrl("https://trello.com/1/OAuthGetAccessToken"); - service.setRequestTokenUrl("https://trello.com/1/OAuthGetRequestToken"); - service.setAuthorizationUrl("https://trello.com/1/OAuthAuthorizeToken?scope=read,write"); - service.setConsumerKey(getProperty_(PROPERTY_API_KEY, OnNull.ERROR)); - service.setConsumerSecret(getProperty_(PROPERTY_SECRET, OnNull.ERROR)); - service.setProjectKey(getProperty_(PROPERTY_PROJECT_KEY, OnNull.ERROR)); - service.setCallbackFunction('authCallback'); - service.setPropertyStore(PropertiesService.getUserProperties()); - return service; - - }, // Authorizer_.getTrelloService - - /** - * - */ - - resetTrello:function() { - - OAuth1.createService('trello') - .setPropertyStore(PropertiesService.getUserProperties()) - .reset(); - - }, // Authorizer_.resetTrello() - - /** - * - */ - - getToken: function() { - - var service = Authorizer_.getTrelloService() - var token = '' - - if (service.hasAccess) { - - var accessData = JSON.parse(PropertiesService.getUserProperties().getProperty('oauth1.trello' )) - - if (accessData){ - - token = accessData.public - - } else { - - throw new Error("Trello API unauthorized! Please authorize at " + AUTHORIZATION_URI) - } - - } else { - - throw new Error("Trello API unauthorized! Please authorize at " + AUTHORIZATION_URI) - } - - return token - - }, // Authorizer_.getToken() - -} // Authorizer_ - -/** - * - */ - -function authCallback(request) { - - var service = Authorizer_.getTrelloService(); - var isAuthorized = service.handleCallback(request); - - if (isAuthorized) { - - var template = HtmlService.createTemplateFromFile('Authorized'); - var page = template.evaluate(); - return HtmlService.createHtmlOutput(page) - - } else { - - return HtmlService.createHtmlOutput('Denied. You can close this page'); - } - -} // authCallback() - -function resetTrello(){ - Authorizer_.resetTrello(); -} - -function deleteUserProperties(){ - PropertiesService.getUserProperties().deleteAllProperties() -} - -function getUserData() { - Logger.log(PropertiesService.getUserProperties().getProperty('oauth1.trello' )) -} diff --git a/NOTES.md b/NOTES.md new file mode 100644 index 0000000..9ae64fa --- /dev/null +++ b/NOTES.md @@ -0,0 +1,14 @@ +#Notes +This is my first GIT-based project. It's also the first REAL javascript development I've done in years. + +I am going to try to cover the basics of what I want to see happen with this project in case the original repository that I forked from isn't interested in including my commits as well as in case anyone interested in the direction I envision wants to work on this as well. What I am wanting is actually fairly simple in terms of describing. I'm QUITE pleased that someone else had started this as I was still in the early stages of finishing touches on an OAuth process that I still wasn't pleased with. + +## Aim +A javascript project that can be easily added to an existing Google product (Doc, Sheets, Slide, Drawing, etc.). It needs to provide the user with a simple interface for authenticating and authorizing so that non-developers can use it. It needs to have a simplistic interface to allow non-developers to quickly integrate it into their Google Prod without being required to dig into Trello developer documentation. + +##Expected Workflow +This is my (initial) expectation for the finished product (the end result might end up being a plugin). + +1. User Creates New Google Product (Doc for example) +1. User Adds GAS-Trello Library +1. diff --git a/OAuth1/Authorizer.gs b/OAuth1/Authorizer.gs new file mode 100644 index 0000000..4fb4fcd --- /dev/null +++ b/OAuth1/Authorizer.gs @@ -0,0 +1,103 @@ +// 34567890123456789012345678901234567890123456789012345678901234567890123456789 + +// JSHint - TODO +/* jshint asi: true */ + +// Authorizer.gs +// ============= +// +// This object provides the autorization methods +var Authorizer_ = { + + /** + * @returns {object} Returns an OAuth1 Service for Trello + */ + getTrelloService : function () { + var service = OAuth1.createService(OAUTH_SERVICE_NAME); + service.setAccessTokenUrl("https://trello.com/1/OAuthGetAccessToken"); + service.setRequestTokenUrl("https://trello.com/1/OAuthGetRequestToken"); + service.setAuthorizationUrl("https://trello.com/1/OAuthAuthorizeToken?scope=read,write"); + service.setConsumerKey(getProperty_(PROPERTY_API_KEY, OnNull.ERROR)); + service.setConsumerSecret(getProperty_(PROPERTY_SECRET, OnNull.ERROR)); + service.setProjectKey(getProperty_(PROPERTY_PROJECT_KEY, OnNull.ERROR)); + service.setCallbackFunction('authCallback'); + service.setPropertyStore(PropertiesService.getUserProperties()); + return service; + + }, // Authorizer_.getTrelloService + + /** + * Resets all OAuth1 settings in Authorizer object. + */ + resetTrello : function () { + OAuth1.createService('trello') + .setPropertyStore(PropertiesService.getUserProperties()) + .reset(); + + }, // Authorizer_.resetTrello() + + /** + * + */ + getToken : function () { + + var service = Authorizer_.getTrelloService() + var token = '' + + if (service.hasAccess) { + + var accessData = JSON.parse(PropertiesService.getUserProperties().getProperty('oauth1.trello')) + + if (accessData) { + + token = accessData.public + + } else { + + throw new Error("Trello API unauthorized! Please authorize at " + AUTHORIZATION_URI) + } + + } else { + + throw new Error("Trello API unauthorized! Please authorize at " + AUTHORIZATION_URI) + } + + return token + + }, // Authorizer_.getToken() + +} // Authorizer_ + +/** + * + */ + +function authCallback(request) { + + var service = Authorizer_.getTrelloService(); + var isAuthorized = service.handleCallback(request); + + if (isAuthorized) { + + var template = HtmlService.createTemplateFromFile('Authorized'); + var page = template.evaluate(); + return HtmlService.createHtmlOutput(page) + + } else { + + return HtmlService.createHtmlOutput('Denied. You can close this page'); + } + +} // authCallback() + +function resetTrello() { + Authorizer_.resetTrello(); +} + +function deleteUserProperties() { + PropertiesService.getUserProperties().deleteAllProperties() +} + +function getUserData() { + Logger.log(PropertiesService.getUserProperties().getProperty('oauth1.trello')) +} \ No newline at end of file diff --git a/README.md b/README.md index 215299f..4e7d7fb 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,10 @@ It currently has on-going development in these areas: * object-oriented approach to Trello 'objects' It currently can be used to: -* authorize / authenticate users -* getting a list id -* creation of new cards in an existing board +* Authorize and Authenticate Users +* Get all Boards and Orgnizations for Users +* Get a List ID +* Create a new Card in an Existing Board You can use the TrelloApp library in your code by using the ID: **MOXamiHNCH44xpQh9H7FTudnfWGfgtIUb**. diff --git a/Api.gs b/Trello/Api.gs similarity index 98% rename from Api.gs rename to Trello/Api.gs index 39b6eae..7ea612e 100644 --- a/Api.gs +++ b/Trello/Api.gs @@ -7,6 +7,7 @@ // ====== // // This local object provides internal access to the Trello API. +/* Not sure what the above means. */ // var Api_ = { @@ -14,11 +15,9 @@ var Api_ = { /** * The API object manages the API version value */ - setVersion: function (version) { // version checked in setProperty_() - setProperty_( PROPERTY_API_VERSION, version, diff --git a/App.gs b/Trello/App.gs similarity index 87% rename from App.gs rename to Trello/App.gs index a3ff9ff..62fe74e 100644 --- a/App.gs +++ b/Trello/App.gs @@ -1,12 +1,16 @@ // 34567890123456789012345678901234567890123456789012345678901234567890123456789 - // JSHint (this file) - TODO // App.gs // ====== // // This object provides the external interface to the TrelloApp library - +/* blinks notes: + Just like API.gs I am unsure what the above line "MEANS". + My goal with this project is to see an object I can instantiate + regardless of anything else in a Google Doc/Sheet/Presentation/Drawing/etc. + and have the object manage Trello behind the scenes FOR the user. +*/ function App(version) { Api_.setVersion(setDefault_(version, '1')) @@ -16,7 +20,6 @@ function App(version) { * URI to the user to trigger Trello authorization pop-up, then get * them to try again. */ - // TODO - Probably a nicer way of doing that App.prototype.getAuthorizationUri = function() { @@ -27,9 +30,8 @@ function App(version) { /** - * + * A method of App to get all boards of current user. */ - App.prototype.getMyBoards = function() { var config = { @@ -50,9 +52,8 @@ function App(version) { } // App.prototype.getMyBoards() /** - * + * A method of App to get all lists from specific board */ - App.prototype.getBoardLists = function(boardId) { var config = { @@ -77,9 +78,8 @@ function App(version) { } // App.getBoardLists() /** - * + * A method of App to get all Organizations that current user is a member of. */ - App.prototype.getMyOrganizations = function() { var config = { @@ -103,7 +103,7 @@ function App(version) { } /** - * + * A method of App that creates a card based on the config payload variable. */ /* diff --git a/Board.gs b/Trello/Board.gs similarity index 99% rename from Board.gs rename to Trello/Board.gs index a8e247e..8917344 100644 --- a/Board.gs +++ b/Trello/Board.gs @@ -84,4 +84,4 @@ function Board() { } -} // Board \ No newline at end of file +} // Board diff --git a/List.gs b/Trello/List.gs similarity index 100% rename from List.gs rename to Trello/List.gs diff --git a/Organization.gs b/Trello/Organization.gs similarity index 100% rename from Organization.gs rename to Trello/Organization.gs diff --git a/TrelloApp.gs b/Trello/TrelloApp.gs similarity index 100% rename from TrelloApp.gs rename to Trello/TrelloApp.gs diff --git a/Wrapper.gs b/Trello/Wrapper.gs similarity index 99% rename from Wrapper.gs rename to Trello/Wrapper.gs index 6fc70eb..0574db4 100644 --- a/Wrapper.gs +++ b/Trello/Wrapper.gs @@ -29,4 +29,3 @@ var Wrapper = { }, } // Wrapper - diff --git a/boardPrefs.gs b/Trello/boardPrefs.gs similarity index 97% rename from boardPrefs.gs rename to Trello/boardPrefs.gs index 1eb7322..b502383 100644 --- a/boardPrefs.gs +++ b/Trello/boardPrefs.gs @@ -41,4 +41,4 @@ function boardPrefs() { return this.wrapped.selfJoin; } -} // Board Preferences \ No newline at end of file +} // Board Preferences diff --git a/Authorised.html b/html/Authorised.html similarity index 100% rename from Authorised.html rename to html/Authorised.html diff --git a/Authorize.html b/html/Authorize.html similarity index 100% rename from Authorize.html rename to html/Authorize.html diff --git a/Config.gs b/settings/Config.gs similarity index 100% rename from Config.gs rename to settings/Config.gs diff --git a/Utils.gs b/settings/Utils.gs similarity index 100% rename from Utils.gs rename to settings/Utils.gs diff --git a/Tests.gs b/testing/Tests.gs similarity index 100% rename from Tests.gs rename to testing/Tests.gs From 0f2ac36a7e956c43c3510e3c790515d0b6ad11cd Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 1 Dec 2015 15:56:53 -0600 Subject: [PATCH 4/4] Reorganized all files out of folders for GASGit usage. --- Trello/Api.gs => Api.gs | 0 Trello/App.gs => App.gs | 0 html/Authorised.html => Authorised.html | 0 html/Authorize.html => Authorize.html | 0 OAuth1/Authorizer.gs => Authorizer.gs | 0 Board.gs | 2 +- settings/Config.gs => Config.gs | 0 Trello/List.gs => List.gs | 0 Trello/Organization.gs => Organization.gs | 0 testing/Tests.gs => Tests.gs | 0 Trello/Board.gs | 87 ----------------------- Trello/boardPrefs.gs | 44 ------------ Trello/TrelloApp.gs => TrelloApp.gs | 0 settings/Utils.gs => Utils.gs | 0 Trello/Wrapper.gs => Wrapper.gs | 0 boardPrefs.gs | 2 +- 16 files changed, 2 insertions(+), 133 deletions(-) rename Trello/Api.gs => Api.gs (100%) rename Trello/App.gs => App.gs (100%) rename html/Authorised.html => Authorised.html (100%) rename html/Authorize.html => Authorize.html (100%) rename OAuth1/Authorizer.gs => Authorizer.gs (100%) rename settings/Config.gs => Config.gs (100%) rename Trello/List.gs => List.gs (100%) rename Trello/Organization.gs => Organization.gs (100%) rename testing/Tests.gs => Tests.gs (100%) delete mode 100644 Trello/Board.gs delete mode 100644 Trello/boardPrefs.gs rename Trello/TrelloApp.gs => TrelloApp.gs (100%) rename settings/Utils.gs => Utils.gs (100%) rename Trello/Wrapper.gs => Wrapper.gs (100%) diff --git a/Trello/Api.gs b/Api.gs similarity index 100% rename from Trello/Api.gs rename to Api.gs diff --git a/Trello/App.gs b/App.gs similarity index 100% rename from Trello/App.gs rename to App.gs diff --git a/html/Authorised.html b/Authorised.html similarity index 100% rename from html/Authorised.html rename to Authorised.html diff --git a/html/Authorize.html b/Authorize.html similarity index 100% rename from html/Authorize.html rename to Authorize.html diff --git a/OAuth1/Authorizer.gs b/Authorizer.gs similarity index 100% rename from OAuth1/Authorizer.gs rename to Authorizer.gs diff --git a/Board.gs b/Board.gs index a8e247e..8917344 100644 --- a/Board.gs +++ b/Board.gs @@ -84,4 +84,4 @@ function Board() { } -} // Board \ No newline at end of file +} // Board diff --git a/settings/Config.gs b/Config.gs similarity index 100% rename from settings/Config.gs rename to Config.gs diff --git a/Trello/List.gs b/List.gs similarity index 100% rename from Trello/List.gs rename to List.gs diff --git a/Trello/Organization.gs b/Organization.gs similarity index 100% rename from Trello/Organization.gs rename to Organization.gs diff --git a/testing/Tests.gs b/Tests.gs similarity index 100% rename from testing/Tests.gs rename to Tests.gs diff --git a/Trello/Board.gs b/Trello/Board.gs deleted file mode 100644 index 8917344..0000000 --- a/Trello/Board.gs +++ /dev/null @@ -1,87 +0,0 @@ -/** - * @classdesc - * This class defines an Trello Board. - * @constructor - */ - -function Board() { - - /** - * @returns {string} The id of this Segment - */ - Board.prototype.getId = function () { - return this.wrapped.id; - } - - /** - * @returns {string} The name of this board - */ - Board.prototype.getName = function () { - return this.wrapped.name; - } - - /** - * @returns {string} The brief description of this board - */ - Board.prototype.getDescription = function () { - return this.wrapped.desc; - } - - /** - * @returns {string} The description data for this board - */ - Board.prototype.getDescriptionData = function () { - return this.wrapped.descData; - } - - /** - * @returns {boolean} Is this board closed or not? - */ - Board.prototype.isClosed = function () { - return this.wrapped.closed; - } - - /** - * @returns {string} The ID of the organization this board is in - */ - Board.prototype.getOrganizationID = function () { - return this.wrapped.idOrganization; - } - - /** - * @returns {boolean} Has this board been 'starred'? - */ - Board.prototype.isFavorited = function () { - return this.wrapped.pinned; - } - - /** - * @returns {string} The url of this board - */ - Board.prototype.getURL = function () { - return this.wrapped.url; - } - - /** - * @returns {string} The short url of this board - */ - Board.prototype.getShortURL = function () { - return this.wrapped.shortUrl; - } - - /** - * @returns {array} The preferences for this board - */ - Board.prototype.getPrefs = function () { - return this.wrapped.prefs; - } - - /** - * @returns {array} The labels for this board - */ - Board.prototype.getLabels = function () { - return this.wrapped.labelNames; - } - - -} // Board diff --git a/Trello/boardPrefs.gs b/Trello/boardPrefs.gs deleted file mode 100644 index b502383..0000000 --- a/Trello/boardPrefs.gs +++ /dev/null @@ -1,44 +0,0 @@ -/** - * @classdesc - * This class defines the Preferences that can be set on a Board. - * @constructor - */ - -function boardPrefs() { - - /** - * @return {string} The premission level of this board - */ - boardPrefs.prototype.getPermissionLevel = function () { - return this.wrapped.permissionLevel; - } - - /** - * @return {string} The voting level of this board - */ - boardPrefs.prototype.getVotingLevel = function () { - return this.wrapped.voting; - } - - /** - * @return {string} The comments level of this board - */ - boardPrefs.prototype.getCommentsLevel = function () { - return this.wrapped.comments; - } - - /** - * @return {string} The invitations level of this board - */ - boardPrefs.prototype.getInvitationLevel = function () { - return this.wrapped.invitations; - } - - /** - * @return {boolean} Can this board be joined without an invitation? - */ - boardPrefs.prototype.isMembershipOpen = function () { - return this.wrapped.selfJoin; - } - -} // Board Preferences diff --git a/Trello/TrelloApp.gs b/TrelloApp.gs similarity index 100% rename from Trello/TrelloApp.gs rename to TrelloApp.gs diff --git a/settings/Utils.gs b/Utils.gs similarity index 100% rename from settings/Utils.gs rename to Utils.gs diff --git a/Trello/Wrapper.gs b/Wrapper.gs similarity index 100% rename from Trello/Wrapper.gs rename to Wrapper.gs diff --git a/boardPrefs.gs b/boardPrefs.gs index 1eb7322..b502383 100644 --- a/boardPrefs.gs +++ b/boardPrefs.gs @@ -41,4 +41,4 @@ function boardPrefs() { return this.wrapped.selfJoin; } -} // Board Preferences \ No newline at end of file +} // Board Preferences