Mavenlink Ruby API Client
The Mavenlink API provides programmatic access to many of Mavenlink’s capabilities, including projects, posts, tasks, and time entries. This is a full-featured Ruby client to the Mavenlink REST API.
Mavenlink’s project collaboration suite allows you to manage your business relationships, share files, and track project activity online from anywhere in the world. Within a project workspace in Mavenlink, you can agree on budget & schedule, track time, send invoices, get paid via PayPal, and complete work.
The REST API
We have full REST API and Ruby client documentation on the wiki.
Example Usage
(sudo) gem install mavenlink
> require 'rubygems'
> require 'mavenlink'
> client = Mavenlink::Client.new(<user_id>, '<api_token>')
> workspaces = client.workspaces(:per_page => 10)
> workspaces.first.title
"This is my workspace!"
> workspaces.first.time_entries.length
20
> workspaces.first.expenses.length
4
> workspaces.first.stories.length
4
> posts = workspaces.first.posts
> posts.length
5
> posts.first.message
"This is an example message."
> post = workspaces.first.create_post(:message => "Hello!")
> post.message
"Hello!"
> post.update(:message => "I edited my post")
true
> post.message
"I edited my post"
> post.update(:message => "")
false
> post.errors
["A message is required"]
> post.destroy
true
Credentials
Finding your User ID and API Token
Your User ID and API Token are both available on your Mavenlink account page at the bottom of the first tab.
Security
For security, the API is provided over SSL only. Additionally, you should consider your API Token to be much like a password. Someone with your token can make changes to your Mavenlink account and perform actions in your name. If you believe that your token has been compromised, login to Mavenlink and reset your token from your account page.
Contributing to the Mavenlink Ruby API Client
We strive to keep the Ruby API up-to-date with our REST API. However, if you find a feature missing, feel free to contribute it.
-
Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet
-
Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it
-
Fork the project
-
Start a feature/bugfix branch
-
Write a failing rspec test case, write code until your test passes, rinse, repeat.
-
Commit and push until you are happy with your contribution
-
Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or it is otherwise necessary, that is fine, but please isolate it to its own commit so that we can cherry-pick around it as needed.
Copyright
Copyright © 2011 Mavenlink, LLC. See LICENSE.txt for further details.