Class: HighLevel::Resources::Links
- Defined in:
- lib/high_level/resources/links.rb
Instance Method Summary collapse
-
#create_link(body:, **_opts) ⇒ Object
Create Link.
-
#delete_link(link_id:, **_opts) ⇒ Object
Delete Link.
-
#get_link_by_id(link_id:, location_id: nil, authorization: nil, **_opts) ⇒ Object
Get Link by ID.
-
#get_links(location_id: nil, **_opts) ⇒ Object
Get Links.
-
#search_trigger_links(location_id: nil, query: nil, skip: nil, limit: nil, authorization: nil, **_opts) ⇒ Object
Search Trigger Links.
-
#update_link(link_id:, body:, **_opts) ⇒ Object
Update Link.
Methods inherited from Base
Constructor Details
This class inherits a constructor from HighLevel::Resources::Base
Instance Method Details
#create_link(body:, **_opts) ⇒ Object
Create Link
65 66 67 68 69 70 71 72 |
# File 'lib/high_level/resources/links.rb', line 65 def create_link(body:, **_opts) request( method: :post, path: "/links/", security: ["bearer"], body: body ) end |
#delete_link(link_id:, **_opts) ⇒ Object
Delete Link
33 34 35 36 37 38 39 |
# File 'lib/high_level/resources/links.rb', line 33 def delete_link(link_id:, **_opts) request( method: :delete, path: "/links/#{link_id}", security: ["bearer"] ) end |
#get_link_by_id(link_id:, location_id: nil, authorization: nil, **_opts) ⇒ Object
Get Link by ID
Get a single link by its ID
12 13 14 15 16 17 18 19 20 |
# File 'lib/high_level/resources/links.rb', line 12 def get_link_by_id(link_id:, location_id: nil, authorization: nil, **_opts) request( method: :get, path: "/links/id/#{link_id}", security: ["bearer"], params: { "locationId" => location_id }.compact, headers: { "Authorization" => }.compact ) end |
#get_links(location_id: nil, **_opts) ⇒ Object
Get Links
55 56 57 58 59 60 61 62 |
# File 'lib/high_level/resources/links.rb', line 55 def get_links(location_id: nil, **_opts) request( method: :get, path: "/links/", security: ["bearer"], params: { "locationId" => location_id }.compact ) end |
#search_trigger_links(location_id: nil, query: nil, skip: nil, limit: nil, authorization: nil, **_opts) ⇒ Object
Search Trigger Links
Get list of links by searching
44 45 46 47 48 49 50 51 52 |
# File 'lib/high_level/resources/links.rb', line 44 def search_trigger_links(location_id: nil, query: nil, skip: nil, limit: nil, authorization: nil, **_opts) request( method: :get, path: "/links/search", security: ["bearer"], params: { "locationId" => location_id, "query" => query, "skip" => skip, "limit" => limit }.compact, headers: { "Authorization" => }.compact ) end |
#update_link(link_id:, body:, **_opts) ⇒ Object
Update Link
23 24 25 26 27 28 29 30 |
# File 'lib/high_level/resources/links.rb', line 23 def update_link(link_id:, body:, **_opts) request( method: :put, path: "/links/#{link_id}", security: ["bearer"], body: body ) end |