Skip to content

A simple API to understand some concepts of rails for API-Only app

Notifications You must be signed in to change notification settings

fmarga/rails_api

Repository files navigation

Workout API

Description

This is a fake Workout API, just to study a little bit about rails API only

Project status: in develpment ⚠️

  • Checklist of improvements incoming:
    • Add endpoints for Level
    • Add tests
    • Improve documentation

Stacks

Dependencies

Database creation

  rails dev:setup seed:basic

Endpoints

Workout

GET /v1/workouts

[
  {
    "id": 1,
    "expires": "2022-10-02",
    "level_id": 2
  }
]

GET /v1/workouts/:id

{
  "id": 1,
  "expires": "2022-10-02",
  "level_id": 2
}

Activities

GET /v1/activities

[
  {
    "id": 1,
    "name": "Lunges",
    "series": 2,
    "repeat": 6,
    "weight": 10,
    "workout_id": 1
  },
  {
    "id": 2,
    "name": "Pushups",
    "series": 2,
    "repeat": 1,
    "weight": 5,
    "workout_id": 1
  }
]

GET /v1/activities/:id

{
  "id": 2,
  "name": "Pushups",
  "series": 2,
  "repeat": 1,
  "weight": 5,
  "workout_id": 1
}

About

A simple API to understand some concepts of rails for API-Only app

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published