Class: Onlyfans::Resources::Giphy
- Inherits:
-
Object
- Object
- Onlyfans::Resources::Giphy
- Defined in:
- lib/onlyfans/resources/giphy.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Giphy
constructor
private
A new instance of Giphy.
-
#list_trending(account, limit: nil, offset: nil, request_options: {}) ⇒ Onlyfans::Models::GiphyListTrendingResponse
Get trending GIFs from the OnlyFans Giphy proxy.
-
#search(account, q:, limit: nil, offset: nil, request_options: {}) ⇒ Onlyfans::Models::GiphySearchResponse
Search GIFs from the OnlyFans Giphy proxy.
Constructor Details
#initialize(client:) ⇒ Giphy
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Giphy.
67 68 69 |
# File 'lib/onlyfans/resources/giphy.rb', line 67 def initialize(client:) @client = client end |
Instance Method Details
#list_trending(account, limit: nil, offset: nil, request_options: {}) ⇒ Onlyfans::Models::GiphyListTrendingResponse
Get trending GIFs from the OnlyFans Giphy proxy. Use the returned ‘id` as the `giphyId` body param when sending a chat or mass message.
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/onlyfans/resources/giphy.rb', line 22 def list_trending(account, params = {}) parsed, = Onlyfans::GiphyListTrendingParams.dump_request(params) query = Onlyfans::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["api/%1$s/giphy/trending", account], query: query, model: Onlyfans::Models::GiphyListTrendingResponse, options: ) end |
#search(account, q:, limit: nil, offset: nil, request_options: {}) ⇒ Onlyfans::Models::GiphySearchResponse
Search GIFs from the OnlyFans Giphy proxy. Use the returned ‘id` as the `giphyId` body param when sending a chat or mass message.
52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/onlyfans/resources/giphy.rb', line 52 def search(account, params) parsed, = Onlyfans::GiphySearchParams.dump_request(params) query = Onlyfans::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["api/%1$s/giphy/search", account], query: query, model: Onlyfans::Models::GiphySearchResponse, options: ) end |