Module: Zanshin::SDK::OrganizationFollowing
- Included in:
- Client
- Defined in:
- lib/zanshin/organization_following.rb
Overview
Zanshin SDK Organization Following
Instance Method Summary collapse
-
#accept_organization_following_request(organization_id, following_id) ⇒ Object
Accepts a request to follow another organization [#reference](api.zanshin.tenchisecurity.com/#operation/acceptOrganizationFollowingRequestByToken).
-
#decline_organization_following_request(organization_id, following_id) ⇒ Object
Declines a request to follow another organization [#reference](api.zanshin.tenchisecurity.com/#operation/declineOrganizationFollowingRequestByToken).
-
#get_organization_following_request(organization_id, following_id) ⇒ Object
Returns a request received by an organization to follow another [#reference](api.zanshin.tenchisecurity.com/#operation/getOrganizationFollowingRequestByToken).
-
#iter_organization_following(organization_id) ⇒ Object
Organization Following Enumerator of an organization [#reference](api.zanshin.tenchisecurity.com/#operation/getOrganizationFollowing).
-
#iter_organization_following_requests(organization_id) ⇒ Object
Organization Following Requests Enumerator of an organization [#reference](api.zanshin.tenchisecurity.com/#operation/getOrganizationFollowingRequests).
-
#stop_organization_following(organization_id, following_id) ⇒ Object
Organization Followers Enumerator of an organization [#reference](api.zanshin.tenchisecurity.com/#operation/removeOrganizationFollowingById).
Instance Method Details
#accept_organization_following_request(organization_id, following_id) ⇒ Object
Accepts a request to follow another organization [#reference](api.zanshin.tenchisecurity.com/#operation/acceptOrganizationFollowingRequestByToken)
76 77 78 79 80 81 |
# File 'lib/zanshin/organization_following.rb', line 76 def accept_organization_following_request(organization_id, following_id) @http.request( 'POST', "/organizations/#{validate_uuid(organization_id)}/following/requests/#{validate_uuid(following_id)}/accept" ) end |
#decline_organization_following_request(organization_id, following_id) ⇒ Object
Declines a request to follow another organization [#reference](api.zanshin.tenchisecurity.com/#operation/declineOrganizationFollowingRequestByToken)
90 91 92 93 94 95 |
# File 'lib/zanshin/organization_following.rb', line 90 def decline_organization_following_request(organization_id, following_id) @http.request( 'POST', "/organizations/#{validate_uuid(organization_id)}/following/requests/#{validate_uuid(following_id)}/decline" ) end |
#get_organization_following_request(organization_id, following_id) ⇒ Object
Returns a request received by an organization to follow another [#reference](api.zanshin.tenchisecurity.com/#operation/getOrganizationFollowingRequestByToken)
62 63 64 65 66 67 |
# File 'lib/zanshin/organization_following.rb', line 62 def get_organization_following_request(organization_id, following_id) @http.request( 'GET', "/organizations/#{validate_uuid(organization_id)}/following/requests/#{validate_uuid(following_id)}" ) end |
#iter_organization_following(organization_id) ⇒ Object
Organization Following Enumerator of an organization [#reference](api.zanshin.tenchisecurity.com/#operation/getOrganizationFollowing)
17 18 19 20 21 22 23 |
# File 'lib/zanshin/organization_following.rb', line 17 def iter_organization_following(organization_id) Enumerator.new do |yielder| @http.request('GET', "/organizations/#{validate_uuid(organization_id)}/following").each do |e| yielder.yield e end end end |
#iter_organization_following_requests(organization_id) ⇒ Object
Organization Following Requests Enumerator of an organization [#reference](api.zanshin.tenchisecurity.com/#operation/getOrganizationFollowingRequests)
47 48 49 50 51 52 53 |
# File 'lib/zanshin/organization_following.rb', line 47 def iter_organization_following_requests(organization_id) Enumerator.new do |yielder| @http.request('GET', "/organizations/#{validate_uuid(organization_id)}/following/requests").each do |e| yielder.yield e end end end |
#stop_organization_following(organization_id, following_id) ⇒ Object
Organization Followers Enumerator of an organization [#reference](api.zanshin.tenchisecurity.com/#operation/removeOrganizationFollowingById)
32 33 34 35 |
# File 'lib/zanshin/organization_following.rb', line 32 def stop_organization_following(organization_id, following_id) @http.request('DELETE', "/organizations/#{validate_uuid(organization_id)}/following/#{validate_uuid(following_id)}") end |