Module: Zanshin::SDK::OrganizationFollowers
- Included in:
- Client
- Defined in:
- lib/zanshin/organization_followers.rb
Overview
Zanshin SDK Organization Followers
Instance Method Summary collapse
-
#create_organization_follower_request(organization_id, token) ⇒ Object
Create organization follower request [#reference](api.zanshin.tenchisecurity.com/#operation/createOrganizationFollowRequests).
-
#delete_organization_follower_request(organization_id, token) ⇒ Object
Delete organization follower request [#reference](api.zanshin.tenchisecurity.com/#operation/deleteOrganizationFollowRequestsbyToken).
-
#get_organization_follower_request(organization_id, token) ⇒ Object
Get organization follower request [#reference](api.zanshin.tenchisecurity.com/#operation/getOrganizationFollowRequestsByToken).
-
#iter_organization_follower_requests(organization_id) ⇒ Object
Organization Followers Requests Enumerator of an organization [#reference](api.zanshin.tenchisecurity.com/#operation/getOrganizationFollowRequests).
-
#iter_organization_followers(organization_id) ⇒ Object
Organization Followers Enumerator of an organization [#reference](api.zanshin.tenchisecurity.com/#operation/getOrganizationFollowers).
-
#stop_organization_follower(organization_id, follower_id) ⇒ Object
Organization Followers Enumerator of an organization [#reference](api.zanshin.tenchisecurity.com/#operation/getOrganizationFollowers).
Instance Method Details
#create_organization_follower_request(organization_id, token) ⇒ Object
Create organization follower request [#reference](api.zanshin.tenchisecurity.com/#operation/createOrganizationFollowRequests)
62 63 64 65 66 67 |
# File 'lib/zanshin/organization_followers.rb', line 62 def create_organization_follower_request(organization_id, token) body = { 'token' => validate_uuid(token) } @http.request('POST', "/organizations/#{validate_uuid(organization_id)}/followers/requests", body) end |
#delete_organization_follower_request(organization_id, token) ⇒ Object
Delete organization follower request [#reference](api.zanshin.tenchisecurity.com/#operation/deleteOrganizationFollowRequestsbyToken)
88 89 90 91 |
# File 'lib/zanshin/organization_followers.rb', line 88 def delete_organization_follower_request(organization_id, token) @http.request('DELETE', "/organizations/#{validate_uuid(organization_id)}/followers/requests/#{validate_uuid(token)}") end |
#get_organization_follower_request(organization_id, token) ⇒ Object
Get organization follower request [#reference](api.zanshin.tenchisecurity.com/#operation/getOrganizationFollowRequestsByToken)
76 77 78 79 |
# File 'lib/zanshin/organization_followers.rb', line 76 def get_organization_follower_request(organization_id, token) @http.request('GET', "/organizations/#{validate_uuid(organization_id)}/followers/requests/#{validate_uuid(token)}") end |
#iter_organization_follower_requests(organization_id) ⇒ Object
Organization Followers Requests Enumerator of an organization [#reference](api.zanshin.tenchisecurity.com/#operation/getOrganizationFollowRequests)
47 48 49 50 51 52 53 |
# File 'lib/zanshin/organization_followers.rb', line 47 def iter_organization_follower_requests(organization_id) Enumerator.new do |yielder| @http.request('GET', "/organizations/#{validate_uuid(organization_id)}/followers/requests").each do |e| yielder.yield e end end end |
#iter_organization_followers(organization_id) ⇒ Object
Organization Followers Enumerator of an organization [#reference](api.zanshin.tenchisecurity.com/#operation/getOrganizationFollowers)
17 18 19 20 21 22 23 |
# File 'lib/zanshin/organization_followers.rb', line 17 def iter_organization_followers(organization_id) Enumerator.new do |yielder| @http.request('GET', "/organizations/#{validate_uuid(organization_id)}/followers").each do |e| yielder.yield e end end end |
#stop_organization_follower(organization_id, follower_id) ⇒ Object
Organization Followers Enumerator of an organization [#reference](api.zanshin.tenchisecurity.com/#operation/getOrganizationFollowers)
32 33 34 35 |
# File 'lib/zanshin/organization_followers.rb', line 32 def stop_organization_follower(organization_id, follower_id) @http.request('DELETE', "/organizations/#{validate_uuid(organization_id)}/followers/#{validate_uuid(follower_id)}") end |