CA Agile Central (formerly Rally) WSAPI client written in Ruby.
In order to authenticate to WSAPI, you will need to obtain an API key for the Rally account. This can be done via Rally OAuth, for example.
Once you have the API key, you can initialize the session object with the key:
s = Wsapi::Session.new("deadbeefdeadbeef")
The constructor also accepts the following options:
:workspace_id
, if not given, user's default workspace is used for queries:version
, WSAPI version, default is3.0
:timeout
, request time out in secondsoauth2
, see: (using WSAPI with OAuth2)[https://github.com/flowdock/rally-wsapi#using-wsapi-with-oauth2]
Authenticating to WSAPI is also possible with OAuth2. Access token used in
requests is given in place of the API token. Refresh token can be supplied with
Wsapi::Session#.setup_refresh_token(client_id, client_secret, refresh_token)
method. It takes optional block parameter, which is called every time the
access token is refreshed.
Some methods accept an optional hash that can have the following options:
:query
, add conditions for fetching objects. E.g.(UserName = "John")
, see WSAPI documentation for details about the syntax:start
, default:1
, fetch results starting from given number:workspace
, override workspace setting of the session:pagesize
, default:200
, page size for results:fetch
, default:true
, fetch full objects
get_current_user
get_user(user_id)
get_user_by_username(username)
get_users(query_string = nil)
If the query_string is present, applies it to the request. Otherwise returns all users. See WSAPI documentation for details about query_string syntax.
get_user_subscription
get_subscription(object_id)
get_subscription_by_subscription_id(subscription_id)
get_project(project_id)
get_projects(opts = {})
get_team_members(project_id, opts = {})
get_editors(project_id, opts = {})
This method replaces #update_artifact, which has been deprecated.
update(object_type, object_id, parameters)
create(object_type, object_fields)
This URL could be used when associating artifacts in the #create or #update methods
build_object_url(object_type, object_id)
setup_refresh_token(client_id, client_secret, refresh_token, &block)
See (Using WSAPI with OAuth2)[https://github.com/flowdock/rally-wsapi#using-wsapi-with-oauth2] for more info.
There's a couple of convenience classes for the following object types:
User
Subscription
Project
Other object types are represented by the generic Object
class which the specific types above extend.
Methods:
id
, identifier of the objectname
, name of the objecturl
, URL of the objectworkspace
, name of the object's workspace
Methods:
username
, usernamefirst_name
, first namelast_name
, last namename
, full nameemail
, email addressadmin?
, is the user admin in the subscription?
Methods:
subscription_id
, subcription identifier
Methods:
subscription
,Subscription
of the project