Characters


Get all characters

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

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

        
fetch('https://fakegundamwikiapi.onrender.com/api/characters', {
    method: 'POST',
    headers: {
        'Authorization': 'Bearer YOUR_TOKEN_HERE',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
        'characterName': 'Earth Federation Forces',
        'charactersAliases': 'Military Organization',
        'characterClassification' : '',
        'characterBirthDate': '',
        'characterGenderId': '',
        'affiliationIds' : []
    })
})
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('Error:', err));
         
    

Update a character

        
fetch('https://fakegundamwikiapi.onrender.com/api/characters/1', {
    method: 'PUT',
    headers: {
        'Authorization': 'Bearer YOUR_TOKEN_HERE',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
        'characterId':1,
        'characterName': 'Earth Federation Forces',
        'charactersAliases': 'Military Organization',
        'characterClassification' : '',
        'characterBirthDate': '',
        'characterGenderId': '',
        'affiliationIds' : []
    })
})
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('Error:', err));
         
    

Active/Inactive a character

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