Skip to content

Pharo Smalltalk library for interaction with Trello API.

Notifications You must be signed in to change notification settings

chicoary/trello-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 

Repository files navigation

Pharo Smalltalk library for interaction with Trello API

Introduction

The TrelloAPI package, written in Pharo Smalltalk, allows searching and interaction through the Trello Restful API.

The messages in Smalltalk to interact with Trello aim for a formal similarity very close to the API documentation.

In the message that corresponds to the endpoint /search and the example below shows how the Trello API documentation is emulated.

 (trelloAPI endpoint: '/search?query=Pharo') get

or

(trelloAPI search: 'Pharo') get.

Additional parameters can be entered:

(trelloAPI endpoint: '/search?query=Pharo&cards_limit=2') get

or

(trelloAPI 
    search: 'Pharo'; 
    options: #(
        cards_limit 2
    ) 
) get

Authorization

Before you can use the API you must inform the API Key and the Token. You can get both by following the instructions at Key API & Tokens.

Then run the following script in Playground:

TrelloAPI 
    register: (
      TrelloAuthorization 
        key: 'db9e904fa729a15ba38adb5a1fbf8bae' 
        token: '06a02a35f1cb0e67c9b6486a1f122653fe1fda4999fba2d7c8940f8bc4304252'
    )
    as: 'chicoary'.

Important: Be careful not to expose your API Key and Token. Do not create code where the Key API and Token are hardcoded and can be exposed in Github after a commit/push. If you do it by accident use the code below to revoke the token in Playground:

TrelloAPI revokeTokenFor: 'çhicoary'

Creation of a TrelloAPI instance

trelloAPI := TrelloAPI authorizedFor: 'çhicoary' 

Object returned in response

STON objects are returned.

About

Pharo Smalltalk library for interaction with Trello API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages