Mobile Suits


Get all mobile suits

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

        
fetch('https://fakegundamwikiapi.onrender.com/api/mobile-suits/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 mobile suit

        
fetch('https://fakegundamwikiapi.onrender.com/api/mobile-suits', {
    method: 'POST',
    headers: {
        'Authorization': 'Bearer YOUR_TOKEN_HERE',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
    "mobileSuitName": "string",
    "mobileSuitUnitType": "string",
    "mobileSuitFirstSeen": "string",
    "mobileSuitLastSeen": "string",
    "manufacturerId": 0,
    "serieId": 0,
    "pilotIds": [
     0
   ] })
})
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('Error:', err));
         
    

Update a mobile suit

        
fetch('https://fakegundamwikiapi.onrender.com/api/mobile-suits/1', {
    method: 'PUT',
    headers: {
        'Authorization': 'Bearer YOUR_TOKEN_HERE',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
    "mobileSuitId" : 1
    "mobileSuitName": "string",
    "mobileSuitUnitType": "string",
    "mobileSuitFirstSeen": "string",
    "mobileSuitLastSeen": "string",
    "manufacturerId": 1,
    "serieId": 1,
    "pilotIds": [1 ] })
})
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('Error:', err));
         
    

Delete a mobile suit

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