diff --git a/README.adoc b/README.adoc index 368b006..162e0b1 100644 --- a/README.adoc +++ b/README.adoc @@ -304,82 +304,81 @@ Success( Allows you to obtain information about link:https://usetrmnl.com/recipes[Recipes]. Example: -⚠️ This _does not_ use the {trmnl_api_link} like every other endpoint documented here. This is why you must customize the settings URI to point to the root of the TRMNL application instead of using the default API endpoint. - [source,ruby] ---- client = TRMNL::API.new { |settings| settings.uri = "https://usetrmnl.com" } -client.recipes # Answers first page. -client.recipes page: 10 # Answers page ten. -client.recipes search: "comic" # Answers first page of comics. -client.recipes "sort-by": "popularity" # Answers first page sorted by popularity. +client.recipes # Answers first page. +client.recipes page: 10 # Answers page ten. +client.recipes search: "comic" # Answers first page of comics. +client.recipes sort: "popularity" # Answers first page sorted by popularity. # Success( -# #, -# custom_fields = [ -# { -# "keyname" => "readme", -# "name" => "About This Plugin", -# "category" => "travel", -# "field_type" => "author_bio", -# "description" => "Displays upcoming...", -# "github_url" => "https://github.com/CaptainProton42/trmnl-bustimes-org" -# }, -# { -# "keyname" => "atco", -# "field_type" => "string", -# "name" => "Bus Stop", -# "description" => "The ATCO code for your bus stop.", -# "help_text" => "You can find this..." -# }, -# { -# "keyname" => "bus", -# "field_type" => "multi_string", -# "name" => "Busses", -# "description" => "Optionally, choose specific bus services you want to display departures for.", -# "help_text" => "Use the name of the service, e.g. '10' or '3A'.", -# "optional" => true -# } -# ], -# icon_content_type = "image/png", -# icon_url = "https://trmnl-public.s3.us-east-2.amazonaws.com/59lqujqwid1cvzsd7sr3erfuexur", -# id = 222328, -# name = "UK Bus Departures (bustimes.org)", -# published_at = 2026-01-14 22:53:07.587 UTC, -# screenshot_url = "https://trmnl.s3.us-east-2.amazonaws.com...", -# statistics = # -# > -# ], -# from = 1, -# next_page_url = "/recipes.json?page=2", -# per_page = 25, -# prev_page_url = nil, -# to = 25, -# total = 658 -# > +# #, +# custom_fields = [ +# { +# "keyname" => "user_location", +# "field_type" => "string", +# "name" => "Weather Location", +# "placeholder" => "New York, NY", +# "description" => "Choose a location", +# "help_text" => "Please be precise...", +# "required" => true +# }, +# { +# "keyname" => "metric", +# "name" => "Temperature Metric", +# "description" => "Celsius or Fahrenheit?", +# "field_type" => "select", +# "options" => [ +# "Fahrenheit", +# "Celsius" +# ], +# "default" => "Fahrenheit" +# } +# ], +# icon_content_type = "image/png", +# icon_url = "https://trmnl-public.s3.us-east-2.amazonaws.com/ajjlbek4cabcvhk3s1lxggn8cgon", +# id = 49610, +# name = "Weather Chum", +# published_at = 2025-05-14 05:32:00 UTC, +# screenshot_url = "https://trmnl.s3.us-east-2.amazonaws.com...", +# statistics = # +# > +# ], +# meta = # +# > # ) ---- -You'll always get a `data` array with may or may not be filled. Pagination information is listed at the bottom. +⚠️ This _does not_ use the {trmnl_api_link} like every other endpoint documented here. Instead, you must customize the settings URI to point to the root of the TRMNL application (i.e. `https://usetrmnl.com`) instead of using the default API endpoint. + +You'll always get a `data` array which may or may not be filled and `meta` (metadata) for handling pagination information. You can also combine the `page`, `search`, and `page` parameters as you see fit. ==== Setup diff --git a/trmnl-api.gemspec b/trmnl-api.gemspec index f189f03..b502643 100644 --- a/trmnl-api.gemspec +++ b/trmnl-api.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "trmnl-api" - spec.version = "0.9.0" + spec.version = "0.10.0" spec.authors = ["TRMNL"] spec.email = ["engineering@usetrmnl.com"] spec.homepage = "https://github.com/usetrmnl/trmnl-api"