Series


Get all series

        
fetch('https://fakegundamwikiapi.onrender.com/api/series', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN_HERE',
    'Content-Type': 'application/json'
  }
})
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('Error:', err));
         
    

Get a single serie

        
fetch('https://fakegundamwikiapi.onrender.com/api/series/1', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN_HERE',
    'Content-Type': 'application/json'
  }
})
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('Error:', err));
         
    

Create a new serie

        
fetch('https://fakegundamwikiapi.onrender.com/api/series', {
    method: 'POST',
    headers: {
        'Authorization': 'Bearer YOUR_TOKEN_HERE',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
        'serieName': 'Mobile Suit Gundam',
        'universeId' . 1
    })
})
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('Error:', err));
         
    

Update a serie

        
fetch('https://fakegundamwikiapi.onrender.com/api/series/1', {
    method: 'PUT',
    headers: {
        'Authorization': 'Bearer YOUR_TOKEN_HERE',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
        'serieId',1
        'serieName': 'Mobile Suit Gundam',
        'universeId' . 1
    })
})
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('Error:', err));
         
    

Delete a serie

        
fetch('https://fakegundamwikiapi.onrender.com/api/series/1', {
  method: 'DELETE',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN_HERE',
    'Content-Type': 'application/json'
  }
});