Skip to content
No description, website, or topics provided.
JavaScript HTML Shell CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
code
scripts
.gitignore
.tm_properties
LICENSE.md
README.md
appspec.yml
buildspec.yml

README.md

Main - OpenlyOperated.org Site

This is the Node.js Express server that hosts the OpenlyOperated.org site, which is itself Openly Operated. It accepts email newsletter signups, and also displays pages stored in OpenlyOperated.org's Content Management System.

View Pages

View Page With Alias

Request

GET /post/[alias]?footer=true

or

GET /report/[alias]?footer=true
Name Type Description
alias string Required The URI alias for a page created by the Admin CMS. Must be only alphanumeric, dashes, and underscores.
footer boolean Whether or not to show the footer that includes additional explanations, links, etc. Defaults to true.

Response

Looks up the page using alias and displays it.

View Page With ID

Request

GET /post?id=[id]
Name Type Description
id integer Required The post ID requested. Must be an integer.

Response

Looks up the page using id and displays it.

Home Page

Request

GET /

Response

Shows the first post tagged "home".

Reports

Request

GET /reports

Response

Shows a list of pages tagged "audit report".

About Us

Request

GET /about-us

Response

Shows the first post tagged "about us".

User Benefits

Request

GET /user-benefits

Response

Shows the first post tagged "user benefits".

For Companies

Request

GET /for-companies

Response

Shows the first post tagged "for companies".

How To

Request

GET /how-to

Response

Shows the first post tagged "how to".

FAQ

Request

GET /faq

Response

Shows all posts tagged "faq", with a table of contents on top.

Auditors

Request

GET /auditors

Response

Shows the first post tagged "auditors".

Auditors

Request

GET /contact

Response

Shows the first post tagged "contact".

Blog

Request

GET /blog

Response

Shows posts tagged "blog".

Privacy Policy

Request

GET /privacy-policy

Response

Shows posts tagged "privacy policy".

Terms

Request

GET /terms

Response

Shows posts tagged "terms".

Newsletter Signup

Subscribe to Newsletter

Request

POST /newsletter-subscribe
Name Type Description
email string Required Email to subscribe to the newsletter.

Response

{
	message: "Successfully subscribed",
	code: 0
}

Confirm Newsletter Subscription

Request

GET /newsletter-confirm
Name Type Description
email string Required Email to confirm subscription for.
code string Required Code that confirms a user is the owner of an email address to complete email signup.

Response

Redirects to home page / with "Newsletter subscription confirmed." success message.

"Do Not Email" Newsletter - Web

Request

GET /newsletter-do-not-email
Name Type Description
email string Required Email to cancel newsletter subscription for.
code string Required Code that confirms a user is the owner of an email address to cancel newsletter subscription.

Response

Shows the "Do Not Email" webpage to confirm the user wishes to never receive emails again.

"Do Not Email" Newsletter

Request

POST /newsletter-do-not-email
Name Type Description
email string Required Email to cancel newsletter subscription for.
code string Required Code that confirms a user is the owner of an email address to cancel newsletter subscription.
reason string Reason they want to unsubscribe from the email newsletter.

Response

Redirects to the home page / with "You have been removed from the Openly Operated newsletter." success message.

Other APIs

Test Error

Request

GET /error-test

Health Check

Request

GET /health

Response

Status 200
{
	message: "OK"
}

License

This project is licensed under the GPL License - see the LICENSE.md file for details

Contact

engineering@openlyoperated.org

You can’t perform that action at this time.