Module: Shikimori::API::V1::Friends
- Included in:
- Shikimori::API::V1
- Defined in:
- lib/shikimori/api/v1/friends.rb
Overview
Methods for the Friends API
Instance Method Summary collapse
-
#create_friend(user_id, headers: nil, **query) ⇒ Boolean
Create friend by user_id.
-
#delete_friend(user_id, headers: nil, **query) ⇒ Boolean
Delete friend by user id.
Instance Method Details
#create_friend(user_id, headers: nil, **query) ⇒ Boolean
Create friend by user_id. Requires ‘friends` oauth scope
27 28 29 30 31 |
# File 'lib/shikimori/api/v1/friends.rb', line 27 def create_friend(user_id, headers: nil, **query) rest.post base_url.join('friends', user_id.to_s).url, {}, headers: headers, query: query true end |
#delete_friend(user_id, headers: nil, **query) ⇒ Boolean
Delete friend by user id. Requires ‘friends` oauth scope
51 52 53 |
# File 'lib/shikimori/api/v1/friends.rb', line 51 def delete_friend(user_id, headers: nil, **query) rest.delete base_url.join('friends', user_id.to_s).url, headers: headers, query: query end |