Skip to content

Repository files navigation

BacklogKit

Gem VersionBuild StatusBuild StatusBuild statusBuild StatusCodecovCode ClimateInline docsLicense

Ruby wrapper for the Nulab's Backlog API.

https://developer.nulab.com/docs/backlog/

Installation

Add this line to your application's Gemfile:

gem'backlog_kit'

And then execute:

$ bundle

Or install it yourself as:

$ gem install backlog_kit

Usage

require'backlog_kit'client=BacklogKit::Client.new(space_id: 'emsk',api_key: '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghij1234')client.get_space.body# get bodyclient.get_space.headers# get headersclient.get_space.status# get statusclient.get_space_activities# no paramsclient.get_space_activities(activity_type_id: [1,4],min_id: 100)# underscored keyclient.get_space_activities(activityTypeId: [1,4],minId: 100)# camelized keyclient.get_groups.body[0].members[0].mail_address# method chaining

You can also use low-level methods.

client.get('projects/1234/customFields')# GETclient.post('groups',name: 'beer')# POSTclient.put('space/notification',content: 'Cheers!')# PUTclient.patch('groups/3712',name: 'whiskey')# PATCHclient.delete('groups/3712')# DELETE

Authentication

API key

client=BacklogKit::Client.new(space_id: 'emsk',api_key: '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghij1234')

OAuth access token

client=BacklogKit::Client.new(space_id: 'emsk',api_key: nil,# api_key should be nilaccess_token: 'abcdefghij1234567890abcdefghij1234567890abcdefghij1234567890abcd')

BacklogKit::Client Config

VariableENV VariableDescriptionDefault
space_idBACKLOG_SPACE_IDYour Backlog SPACE ID.
second_level_domainBACKLOG_SECOND_LEVEL_DOMAINYour Backlog SECOND LEVEL DOMAIN.backlog
top_level_domainBACKLOG_TOP_LEVEL_DOMAINYour Backlog TOP LEVEL DOMAIN.com
api_keyBACKLOG_API_KEYYour Backlog API KEY.
client_idBACKLOG_OAUTH_CLIENT_IDCLIENT ID of your Backlog application.
client_secretBACKLOG_OAUTH_CLIENT_SECRETCLIENT SECRET of your Backlog application.
refresh_tokenBACKLOG_OAUTH_REFRESH_TOKENREFRESH TOKEN obtained from the token endpoint.

If you set ENV variables, you can create an instance more simply.

client=BacklogKit::Client.new

Supported Backlog API Version

BacklogKit supports Backlog API 2.32.2.

BacklogKit's API documentation is here.

Supported Ruby Versions

  • Ruby 2.0.0
  • Ruby 2.1
  • Ruby 2.2
  • Ruby 2.3
  • Ruby 2.4
  • Ruby 2.5
  • Ruby 2.6
  • Ruby 2.7

Contributing

  1. Fork it ( https://github.com/emsk/backlog_kit/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

License

MIT

About

Client library for the Nulab's Backlog API version 2 written in Ruby.

Topics

Resources

Stars

29 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages