Stack
A Stack represents a collection of Projects used by a single person. A Stack belongs to an Account.
A Stack contains zero or more StackEntries, each of which links the Stack to a single Project.
Properties
- id
- The unique ID for the Stack.
- updated_at
- The most recent time at which any Projects were added to or removed from this Stack.
- project_count
- The total number of Projects currently contained in this Stack.
- stack_entries
- A collection of zero or more StackEntries. If the Stack object was returned in response to a collection request (/projects/x/stacks.xml), you will receive only a single StackEntry corresponding to the Project in question.
- account_id
- The unique ID of the Account which owns this Stack.
- account
- For convenience, a full Account object may be included here. If the stack object was returned in response to a collection request (/projects/x/stacks.xml), the Account objects will be present.
URL
To get a single Stack belonging to an Account:
GET http://www.ohloh.net/accounts/{account_id}/stacks/{stack_id}.xml
A handy shortcut for getting the default Stack for an Account when you don’t know the stack_id:
GET http://www.ohloh.net/accounts/{account_id}/stacks/default.xml
This method is not paginated — you will always receive a single Stack. However, this Stack may contain a very large number of StackEntries within it. Each StackEntry will include a full Project object.
If you do not know the Account ID, you can also retrieve the Stack using the MD5 hash of the email address. Read more about email-based queries here.
Collection URL
To get a list of all Stacks for a particular Project:
GET http://www.ohloh.net/projects/{project_id}/stacks.xml
The Stacks returned in this collection will each contain only a single StackEntry, corresponding to the Project in question.
Each Stack in the result will also include an Account object.
The Stack collection is paginated, and supports the standard collection request parameters with the following details:
- query
- If supplied, only Stacks owned by Accounts with names matching the query string will be returned.
- sort
- Stack collections support the following sort options:
- created_at
- created_at_reverse (default)
- The created_at option sorts by the time at which the Project was added to the stack.
- project_count
- project_count_reverse
- name
- name_reverse
