Skip to content

Commit

Permalink
Link to the contact form for questions about API as well. Fixes #1784
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandauer committed Feb 20, 2024
1 parent a1135a8 commit 0abaa42
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
3 changes: 2 additions & 1 deletion app/controllers/documentation_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ def how_to_lobby_your_local_council; end
sig { void }
def contact
# Allow the auto reply to no-reply to prepopulate the email field to make things a tiny bit easier
@contact_message = T.let(ContactMessage.new(name: params[:name], email: params[:email]), T.nilable(ContactMessage))
# Also allow the reason to be chosen automatically if asking about the API
@contact_message = T.let(ContactMessage.new(name: params[:name], email: params[:email], reason: params[:reason]), T.nilable(ContactMessage))
end

sig { void }
Expand Down
7 changes: 5 additions & 2 deletions app/views/_tailwind/documentation/api_howto.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,16 @@
Standard agreements for commercial use are at
<%= pa_link_to "oaf.org.au/standard-agreements/planningalerts-commercial", "https://www.oaf.org.au/standard-agreements/planningalerts-commercial/" %>.
Please
<%= pa_mail_to "contact@planningalerts.org.au", "contact us" %>
<%= pa_link_to "contact us", documentation_contact_path(reason: "I want API access or commercial use") %>
for
<strong>commercial</strong>
use. Commercial users may include Real Estate Agencies, Architects, Planners or Builders.
</p>
<p class="mt-8">
Also, please <%= pa_mail_to "[email protected]", "get in touch" %> if you intend to use the service on a large scale. In order to maintain quality of service for our API users, this service is rate limited by default to approximately 1000 requests per day.
Also, please
<%= pa_link_to "get in touch", documentation_contact_path(reason: "I want API access or commercial use") %>
if you intend to use the service on a large scale.
In order to maintain quality of service for our API users, this service is rate limited by default to approximately 1000 requests per day.
</p>
<p class="mt-8">
We offer a range of paid options, from rate&ndash;limited to unlimited use of this service.
Expand Down
7 changes: 5 additions & 2 deletions app/views/documentation/api_howto.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,16 @@
Standard agreements for commercial use are at
<a href="https://www.oaf.org.au/standard-agreements/planningalerts-commercial/">oaf.org.au/standard-agreements/planningalerts-commercial</a>.
Please
= mail_to "contact@planningalerts.org.au", "contact us"
= link_to "contact us", documentation_contact_path(reason: "I want API access or commercial use")
for
%strong commercial
use. Commercial users may include Real Estate Agencies, Architects, Planners or Builders.

%p
Also, please #{mail_to "[email protected]", "get in touch"} if you intend to use the service on a large scale. In order to maintain quality of service for our API users, this service is rate limited by default to approximately 1000 requests per day.
Also, please
= link_to "get in touch", documentation_contact_path(reason: "I want API access or commercial use")
if you intend to use the service on a large scale.
In order to maintain quality of service for our API users, this service is rate limited by default to approximately 1000 requests per day.

%p
We offer a range of paid options, from rate&ndash;limited to unlimited use of this service.
Expand Down

0 comments on commit 0abaa42

Please sign in to comment.