https://github.com/gamemann/gfl-api-in-elixir
GFL's API for Members, Supporters, and VIPs written in Elixir. This isn't being used in production, but I figured it's good practice when learning Elixir.
https://github.com/gamemann/gfl-api-in-elixir
api elixir json postgresql
Last synced: over 1 year ago
JSON representation
GFL's API for Members, Supporters, and VIPs written in Elixir. This isn't being used in production, but I figured it's good practice when learning Elixir.
- Host: GitHub
- URL: https://github.com/gamemann/gfl-api-in-elixir
- Owner: gamemann
- Created: 2020-06-21T01:39:04.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-08-28T11:11:36.000Z (almost 2 years ago)
- Last Synced: 2025-02-28T12:30:05.434Z (over 1 year ago)
- Topics: api, elixir, json, postgresql
- Language: Elixir
- Homepage: https://moddingcommunity.com/
- Size: 50.8 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GFL API In Elixir
## Description
The GFL API written in Elixir. I'm writing this project to practice Elixir, a functional programming language I'm learning.
## Installation
1. Install a MySQL server.
2. Modify your environment config in `config/.exs` and configure the MySQL details along with the authorization token (`token` variable).
3. Install dependencies by running `mix deps.get`.
4. Create database by running `mix ecto.create`.
5. Migrate necessary schemas by running `mix ecto.migrate`.
6. Run the web server by running `mix phx.server`.
**Note** - By default, the web server binds to port `4000`. Therefore, if you're using localhost, you can grab the player's perk status by going to `http://localhost:4000/donators?steamid=`. Otherwise, you can use NGINX and write a proxy config to redirect to the web application.
## Response
The web application returns a JSON array such as the following:
```
{"error":-1,"group":1,"steamid":"12345"}
```
**Note** - When the Steam ID isn't found, `group` will return `0` and `error` will be set to `404`.
## Credits
* [Christian Deacon](https://www.linkedin.com/in/christian-deacon-902042186/)