Inspiration

We would like to build an API that provides funny quotes to people. We choose to use Blackbird since it allows us to build the API in the shortest amount of time possible while also producing a killer API!

What it does

The API provides funny quotes for people. We built the API using two different approaches: one is blackbirds operations of Ambassador and another is Gravitee

How we built it

We built the API by using different Blackbird operations and commands below and were able to save time since it took us 3 minutes for everything to be set up. Below is the list of all the commands we used to build the API:

  1. blackbird login
  2. blackbird api create "Humor API" --spec-path ./humorapi.yaml
  3. blackbird api list humor-api
  4. blackbird mock create humor-api --api-name humor-api
  5. blackbird mock list humor-api
  6. blackbird instance list humor-api
  7. curl https://default-blackbird-viclinhs-organization-46e57-0.blackbird-relay.a8r.io/humor-api/funnyquotes
  8. blackbird mock config humor-api set dynamic=false
  9. blackbird mock config humor-api get # to get the whole config
  10. blackbird mock config humor-api get dynamic
  11. blackbird code generate --template go --spec-path ./humorapi.yaml --output go-humor-api
  12. Enter value for variable ProjectName: humorie
  13. Enter value for variable GoModule: api
  14. Enter value for variable GoVersion: 1.22.0 enable GitHub Actions - Test module? [y/n]: y enable Readme module? [y/n]: y enable Dockerfile module? [y/n]: y
  15. go run cmd/go-humor-api/main.go
  16. blackbird code run humor-api --dockerfile Dockerfile --context . --local-port 80
  17. blackbird instance list humor-api
  18. blackbird code debug humor-api --dockerfile Dockerfile --context . --local-port 80
  19. blackbird deployment create humor-api --dockerfile Dockerfile --context .
  20. blackbird deployment status humor-api
  21. blackbird deployment status humor-api --logs
  22. blackbird logout
  • We built the same API using Gravitee technology. It took us more than 30 minutes for the API to be set up and deployed. Gravitee: https://youtu.be/vG7-kIbFRRM

Challenges we ran into

We had challenges to learn the new technology and build the new API using blackbird of Ambassador and Gravitee

Accomplishments that we're proud of

We were able to build the new API with 22 blackbird commands in short amount of time. We were also able to build an APi using Gravitee

What we learned

We learn how to build API using blackbird commands and technology as well as Gravitee

What's next for Humorie

We would like to improve the API by using blackbird technology

Built With

Share this project:

Updates