Universes


Get all universes

        
fetch('https://fakegundamwikiapi.onrender.com/api/universes', {
  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 universe

        
fetch('https://fakegundamwikiapi.onrender.com/api/universes', {
  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 universe

        
fetch('https://fakegundamwikiapi.onrender.com/api/universes', {
    method: 'POST',
    headers: {
        'Authorization': 'Bearer YOUR_TOKEN_HERE',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
        'universeName': 'Universal Century'
    })
})
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('Error:', err));
         
    

Update a universe

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

Active/Inactive a universe

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