Skip to content

Commit

Permalink
Merge pull request #4 from upwork/v1.1.0
Browse files Browse the repository at this point in the history
V1.1.0
  • Loading branch information
mnovozhylov committed Oct 12, 2015
2 parents cd7910d + c21be56 commit 70a4ac1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.1.0
* Get Categories (V1) is now fully depricated
* Added new Activities API - Assign to specific engagement the list of activities

## 1.0.1
* added a possibility of usage a custom http client
* added basic tests
Expand Down
7 changes: 6 additions & 1 deletion api/routers/activities/engagement/engagement.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,9 @@ func (r a) GetSpecific(engagementRef string) (*http.Response, []byte) {
// Assign engagements to the list of activities
func (r a) Assign(company string, team string, engagement string, params map[string]string) (*http.Response, []byte) {
return r.client.Put("/otask/v1/tasks/companies/" + company + "/teams/" + team + "/engagements/" + engagement + "/tasks", params)
}
}

// Assign to specific engagement the list of activities
func (r a) AssignToEngagement(engagementRef string, params map[string]string) (*http.Response, []byte) {
return r.client.Put("/tasks/v2/tasks/contracts/" + engagementRef, params)
}
7 changes: 1 addition & 6 deletions api/routers/metadata/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ func New(c api.ApiClient) (a) {
return r
}

// Get categories
func (r a) GetCategories() (*http.Response, []byte) {
return r.client.Get("/profiles/v1/metadata/categories", nil)
}

// Get categories (V2)
func (r a) GetCategoriesV2() (*http.Response, []byte) {
return r.client.Get("/profiles/v2/metadata/categories", nil)
Expand All @@ -64,4 +59,4 @@ func (r a) GetTests() (*http.Response, []byte) {
// Get reasons
func (r a) GetReasons(params map[string]string) (*http.Response, []byte) {
return r.client.Get("/profiles/v1/metadata/reasons", params)
}
}

0 comments on commit 70a4ac1

Please sign in to comment.