restpack-group-client 0.0.44 → 0.0.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -43,7 +43,6 @@ module RestPack
43
43
  class MembershipApi < BaseApi
44
44
  def index(params)
45
45
  #TODO: GJ: require channel_id
46
- p "MembershipApi..........."
47
46
  hydrate http_get('/api/v1/memberships.json', params)
48
47
  end
49
48
 
@@ -52,6 +51,12 @@ module RestPack
52
51
  hydrate http_get("/api/v1/memberships/#{id}.json")
53
52
  end
54
53
  end
54
+
55
+ class InvitationApi < BaseApi
56
+ def accept(params)
57
+ http_put("/api/v1/invitations/accept", params)
58
+ end
59
+ end
55
60
 
56
61
  end
57
62
  end
@@ -24,6 +24,12 @@ module RestPack
24
24
  json = RestClient.post(url, params)
25
25
  Yajl::Parser.parse(json, :symbolize_keys => true)
26
26
  end
27
+
28
+ def http_put(path, params = {})
29
+ url = build_url(path)
30
+ json = RestClient.put(url, params)
31
+ Yajl::Parser.parse(json, :symbolize_keys => true)
32
+ end
27
33
 
28
34
  def build_url(path)
29
35
  protocol = @options[:use_https] ? "https://" : "http://"
@@ -1,7 +1,7 @@
1
1
  module RestPack
2
2
  module Group
3
3
  module Client
4
- VERSION = "0.0.44"
4
+ VERSION = "0.0.45"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restpack-group-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.44
4
+ version: 0.0.45
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: