Manufacturers


Get all manufacturers

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

        
fetch('https://fakegundamwikiapi.onrender.com/api/manufacturers/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 manufacturer

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

Update a manufacturer

        
fetch('https://fakegundamwikiapi.onrender.com/api/manufacturers/1', {
    method: 'PUT',
    headers: {
        'Authorization': 'Bearer YOUR_TOKEN_HERE',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
        'manufacturerId' : 1,
        'manufacturerName': 'Earth Federation Forces'
    })
})
.then(res=>res.json())
.then(json=>console.log(json));
         
    

Active/Inactive a manufacturer

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