Skip to content

Releases: benjaminlukeclark/monsternames-api

Containerised Monsternames!

18 Oct 13:40
Compare
Choose a tag to compare
  • monsternames-api is now fully containerised! ๐Ÿšข
  • CircleCI pushes to ECR in my AWS ๐Ÿ“Œ
  • ECR images tagged with SHA1 hash of commit for identification ๐Ÿ†”
  • db vars now read in from env rather than /etc/config.json ๐Ÿ“–
  • Behave! behaviour tests added ๐Ÿงช
  • Logging changed to be using actual log handlers and not print statements โœ‹
  • Projects that use this page was not communicate in previous release, so hey that's here ๐Ÿ™‰
  • Removed need for API key in GET requests... shouldn't have been there anyway that was a ๐Ÿ›

What's Changed

Full Changelog: v1.1.4...v2.0.0

addNames page and api error messaging

22 Jun 22:21
34c5d60
Compare
Choose a tag to compare
  • Added addNames page ๐Ÿ‘
  • Page allows posting of data to API for users whom are not familiar with programming ๐Ÿ‘ค
  • Also involves slight changes to api error messages so they make more sense in the frontend ๐Ÿ›‘

SSL

21 Jun 22:11
1bd6ae5
Compare
Choose a tag to compare
SSL
  • Used certbot to get an actually trusted SSL cert for monsternames-api.com ๐Ÿ˜ฎ
  • Amended static webpages so GET! for API works โš™๏ธ
  • Updated readme with helpful info about how to replicate this ๐Ÿฆ„

Endpoint Consolidation

19 Jun 10:16
98f8ddd
Compare
Choose a tag to compare

Its been a while since I've worked on this...

But I had a burst of energy last night that let to quite a significant patch. I completely redone the backend of the flask applicaiton to make it adher to OOP principles ๐Ÿฆ„ . So now:

  • There's no longer an individual .py file for each type of monster ๐Ÿ˜ฎ
  • Instead there's just one class that's been defined: monster_endpoints. ๐Ÿ”š
  • This class takes: ๐Ÿฅก
    • two peewee.Model or None instances - one for first name and one for last name
    • Two booleans indicating if first and last names are present for the endpoint ๐Ÿ†—
    • The name of the monster we are creating an endpoint for ๐Ÿ“›
  • The class exposes three public methods, each of which behave differently depending on data provided to the constructor:
    • insert_first_name ๐ŸŒ“
    • insert_last_name ๐ŸŒ—
    • return_full_name ๐ŸŒ•
  • Logic to verify users' API keys is now a private method of this endpoint ๐Ÿ”’

This doesn't impact users in any way, but makes my job a heck of a lot easier if i want to extend this in the future with more functionality and/or endpoints.

To update to this version:

git pull
git clean -fx
supervisorctl reload

Small web changes

12 Feb 02:10
Compare
Choose a tag to compare
  • Changed home page to allow generation of names from all endpoints... the idea being to allow interaction with the api even if you're not a programmer
  • Added license file to git repo
  • Added CORS headers to goatmen endpoint as this was accidentally left out
  • Fixed typos on the website

Website live

11 Feb 04:33
72ba397
Compare
Choose a tag to compare
  • Purchased custom domain for api ๐Ÿ•ธ๏ธ
  • Created website for domain, with a home, contribute and endpoints page ๐Ÿ‘
  • Removed info from readme that is now present on website
  • Added (hopefully) helpful content to the website ๐ŸŽง
  • Added CORS headers to api requests so it works in browsers ๐Ÿฆ„
  • Added license to repo

First version live with 16 endpoints

07 Feb 00:44
e8e739b
Compare
Choose a tag to compare

Base URL: http://ec2-3-9-54-103.eu-west-2.compute.amazonaws.com

  • Version 1 is live!
  • 16 juicy endpoints:
endpoint method theme
/api/v1.0/goatmen GET
/api/v1.0/goatmen/firstName POST Cute pet names
/api/v1.0/goblin GET
/api/v1.0/goblin/firstName POST Typical bloke names
/api/v1.0/goblin/lastName POST Typical bloke names
/api/v1.0/ogre GET
/api/v1.0/ogre/firstName POST Dumb sounding cavemen
/api/v1.0/orc GET
/api/v1.0/orc/firstName POST Random nouns
/api/v1.0/orc/lastName POST Negative adjectives
/api/v1.0/skeleton GET
/api/v1.0/skeleton/firstName POST Classy
/api/v1.0/skeleton/lastName POST Classy
/api/v1.0/troll GET
/api/v1.0/troll/firstName POST vaguely Scandinavian
/api/v1.0/troll/lastName POST vaguely Scandinavian

My good friend Robert Levett-Millett helped massively with thinking of naming schemas and values. Sadly he doesn't have a Github so the only contact link I'll give out will be LinkedIn: https://www.linkedin.com/in/robert-levett-millett/

Between us we've managed to kick the database off with:

  • 16 goatmen first names
  • 15 goblin first names
  • 6 goblin last names
  • 10 ogre first names
  • 12 orc first names
  • 14 orc last names
  • 9 skeleton first names
  • 6 skeleton last names
  • 10 troll first names
  • 6 troll last names

Someone far better than me at Maths can probably tell you how many unique entries that is per GET endpoint ๐Ÿฐ

Happy random naming!