0.0
No commit activity in last 3 years
No release in over 3 years
Trello client
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 10.0
~> 3.0
~> 3.3
 Project Readme

TrelloClient

Easy to use, non official Trello Client based on Trello API Docs.

Installation

Add this line to your application's Gemfile:

gem 'trello_client'

And then execute:

$ bundle

Or install it yourself as:

$ gem install trello_client

Usage

Get key and token

If this is your first time using Trello API, get key and token from here.

Client

Create board/list/card clients based on api key and token.

client = Trello::Client.new(key: <your-key>, token: <your-token>)
board_client = Trello::Board.new(client)
list_client  = Trello::List.new(client)
card_client  = Trello::Card.new(client)

Board

Get all boards

board_client.fetch_all

Get a board

board_client.fetch(id: <board-id>)

Add a board

body = { name: "test", ... }
board_client.add(body)

Delete a board

board_client.delete(id: <board-id>)

List

Get all lists of a board

list_client.fetch_all(board_id: <board-id>)

Get a list

list_client.fetch(id: <list-id>)

Add a list

body = { name: "test", ... }
list_client.add(board_id: <board-id>, body )

Card

Get all cards of a list

card_client.fetch_all(list_id: <list-id>)

Get a card

card_client.fetch(id: <card-id>)

Add a card

# options of body(as a hash):
#   - name: name of card
#   - desc: description
#   - ...
body = { name: "test", desc: "description", ... }
card_client.add(list_id: <list-id>, body)

Delete a card

card_client.delete(id: <card-id>)

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/tolearn2/trello_client. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.