Constani Go Backend

CodeFactor Grade GitHub last commit

Constani GoLang Backend to Manage Database Services and API Endpoints

Installation and running

Clone the repository and run go run main.go in your terminal to open the API server.

Note

Default port number is 3000

Endpoints

GET /api/v1/anime Gives a response as all of the stored anime data

GET /api/v1/get/:id Gives a response as the data of the specified anime ID’s anime serie

POST /api/v1/create requires a JSON body with keys that are given below

Keys Type Required
Id string true
serie string true
avatar string true
totalLike int true
episodes array of objects true

Example JSON Body For Create Endpoint

{
  "Id": "wAHe4Z6L5o12",
  "name": "Hellsing",
  "avatar": "https://m.media-amazon.com/images/M/MV5BM2E3ZDU4OWUtZDhjOC00ZTc2LTg5NDItMTJlZTkzNmE1ZWY5XkEyXkFqcGdeQXVyMTA3OTEyODI1._V1_FMjpg_UX1000_.jpg",
  "banner": "https://cdn.kayiprihtim.com/wp-content/uploads/2021/03/Hellsing.jpg",
  "totalLike": 12,
  "episodes": [
    {
      "episodeNumber": 1,
      "episodeName": "1. Hellsing I XX",
      "episodesDuration": "24dk",
      "likes": 12,
      "Avatar": "https://yeppuu.com/uploads/quiz/2021/02/image_750x_602a90c5ca4f6.jpg",
      "description": "Bir geriye dönüş, yıllar önce Alcuard'ı uyandıran ve Hellsing Örgütü'nün nihai olmuşuna yol açan ihaneti koyar. ",
      "videoURL": "",
      "Comments": [
        {
          "content": "Herkes olmuş coder",
          "authorID": 760499240966684700,
          "authorName": "Atlas",
          "authorAvatar": "https://cdn.discordapp.com/avatars/760499240966684683/9e4801cd83274c93f3a4dd9bd60a3ccf.png?size=1024"
        },
        {
          "content": "Herkes olmuş coder",
          "authorID": 760499240966684700,
          "authorName": "Uras2132",
          "authorAvatar": "https://cdn.discordapp.com/avatars/760499240966684683/9e4801cd83274c93f3a4dd9bd60a3ccf.png?size=1024"
        }
      ]
    },
    {
      "episodeNumber": 2,
      "episodeName": "2. Hellsing II",
      "episodesDuration": "24dk",
      "likes": 12,
      "Avatar": "https://occ-0-1723-1722.1.nflxso.net/dnm/api/v6/9pS1daC2n6UGc3dUogvWIPMR_OU/AAAABdyk4ViM6IAFhfpwZY9GChWWmpQyu-eZU6TeXkuSwb4YHLVlznp--x3pKQJ_lk4Uj-OUcj1PES2aXLQ_aBOM2bnW-n7TgKgDpvezUS8OTm3MMlVo3z58cZQT.jpg?r=334",
      "description": "Art arda yaşanan vampir saldıları, Hellsing mensuplarına kurulan ölümcül bir pusuyla doruk noktasına ulaşır ve tüm dikkatlerini karanlık bir grubun uzerine çevirir.",
      "videoURL": "",
      "Comments": [
        {
          "content": "Herkes olmuş coder",
          "authorID": 760499240966684700,
          "authorName": "Atlas",
          "authorAvatar": "https://cdn.discordapp.com/avatars/760499240966684683/9e4801cd83274c93f3a4dd9bd60a3ccf.png?size=1024"
        },
        {
          "content": "Herkes olmuş coder",
          "authorID": 760499240966684700,
          "authorName": "Uras2132",
          "authorAvatar": "https://cdn.discordapp.com/avatars/760499240966684683/9e4801cd83274c93f3a4dd9bd60a3ccf.png?size=1024"
        }
      ]
    },
    {
      "episodeNumber": 3,
      "episodeName": "3. Hellsing III",
      "episodesDuration": "24dk",
      "likes": 12,
      "Avatar": "https://m.media-amazon.com/images/M/MV5BZGFiY2JhZjQt[email protected]._V1_QL75_UX500_CR0,47,500,281_.jpg",
      "description": "Milenyum örgütünün Naziler ve Vatikan ile bağlarını orataya çıkaran Integra, daha fazla bilgi bulmaları için Brezilya'ya bir delegsyon gönderir.",
      "videoURL": "",
      "Comments": [
        {
          "content": "Herkes olmuş coder",
          "authorID": 760499240966684700,
          "authorName": "Atlas",
          "authorAvatar": "https://cdn.discordapp.com/avatars/760499240966684683/9e4801cd83274c93f3a4dd9bd60a3ccf.png?size=1024"
        },
        {
          "content": "Herkes olmuş coder",
          "authorID": 760499240966684700,
          "authorName": "Uras2132",
          "authorAvatar": "https://cdn.discordapp.com/avatars/760499240966684683/9e4801cd83274c93f3a4dd9bd60a3ccf.png?size=1024"
        }
      ]
    }
  ]
}

GitHub

View Github