From e5770cef966fd085d6ce1afa97e2e4bba1608ae7 Mon Sep 17 00:00:00 2001 From: Matthew Landauer Date: Tue, 27 Aug 2024 03:19:43 +0000 Subject: [PATCH] Add a place to start a trial --- app/views/documentation/api_landing.html.erb | 31 ++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/app/views/documentation/api_landing.html.erb b/app/views/documentation/api_landing.html.erb index 011910964..adf3b86a1 100644 --- a/app/views/documentation/api_landing.html.erb +++ b/app/views/documentation/api_landing.html.erb @@ -149,6 +149,37 @@ +<%# Only show this section if you don't have an API key yet %> +<% if api_key.nil? %> +
+
+ <%= render HeadingComponent.new(tag: :h2) do %> + <%# TODO: Make trial period flexible %> + Instant access 14 day trial + <% end %> +

+ Build, test and explore with live API data +

+ <%# TODO: Fill out numbers automatically %> +

+ Enjoy up to 500 requests a day (returning up to a total of 50,000 applications per day) for 14 days. +

+ <%= image_tag "illustration/key.svg", alt: "", size: "237x155", class: "my-8" %> + <%# TODO: Do something different when you're logged in %> + <% if current_user %> + <%= pa_button_to "Create API key", api_keys_path, method: :post %> + <% else %> +

+ To get an instant API key simply + <%= pa_link_to "create an account", new_user_registration_path %> + or + <%= pa_link_to "sign in", new_user_session_path %>. +

+ <% end %> +
+
+<% end %> +
<%= render HeadingComponent.new(tag: :h2, extra_classes: "mb-6").with_content("What's in the API?") %>