WACAPI

How to use it.

Create Your Token

import axios from 'axios';


const language = 'en'; // ['ar', en]

axios.post('https://wacapi.hixvm.com/api/v1/'+language+'/apitoken/new', {
    headers: { 'Content-Type': 'application/json' },
})
.then(function (response) {
    console.log(response.data);
})
.catch(function (error) {
    console.log(error);
});
    // output
    {
        'status': '...',
        'result': '...',
        'token': '...'
    }

Get Club Informations

import axios from 'axios';


const language = 'en'; // ['ar', en]
const token    = 'your token here';
const url      = 'https://wacapi.hixvm.com/api/v1/' +language+ '/' +token;

axios.get(url + '/clubs/wac', {
    headers: { 'Content-Type': 'application/json' },
})
.then(function (response) {
    console.log(response.data);
})
.catch(function (error) {
    console.log(error);
});
    // output
    {
        'status': true,
        'club": {
            'full_name': '...',
            "name_abbreviation': '...',
            'contry': '...',
            'city': '...',
            'logo': '...',
            'color_code': '...',
            'date_of_establishment': '...',
            'founder': '...',
            'website_link': '...',
            'facebook_link': '...',
            'instagram_link': '...',
            'twitter_link': '...',
            'updated_at': '...'
        }
    }

Show All Players

import axios from 'axios';


const language = 'en'; // ['ar', en]
const token    = 'your token here';
const url      = 'https://wacapi.hixvm.com/api/v1/' +language+ '/' +token;
    
axios.get(url + '/players', {
    headers: { 'Content-Type': 'application/json' },
})
.then(function (response) {
    console.log(response.data);
})
.catch(function (error) {
    console.log(error);
});
    // output
    {
        'status': true,
        'players': [
            {
                'id': ...,
                'full_name': '...',
                'number': '...',
                'nationality': '...',
                'role': '...',
                'updated_at': '...'
            },
            {
                'id': ...,
                'full_name': '...',
                'number': '...',
                'nationality': '...',
                'role': '...',
                'updated_at': '...'
            },
            ...
        ]
    }

Show One Player

import axios from 'axios';
    
    
const language = 'en'; // ['ar', en]
const token    = 'your token here';
const url      = 'https://wacapi.hixvm.com/api/v1/' +language+ '/' +token;
        
axios.get(url + '/players/1', {
    headers: { 'Content-Type': 'application/json' },
})
.then(function (response) {
    console.log(response.data);
})
.catch(function (error) {
    console.log(error);
});
    // output
    {
        'status': true,
        'player': {
            'id': ...,
            'full_name': '...',
            'number': '...',
            'nationality': '...',
            'role': '...',
            'updated_at': '...'
        }
    }

Show All Championships

import axios from 'axios';
    
    
const language = 'en'; // ['ar', en]
const token    = 'your token here';
const url      = 'https://wacapi.hixvm.com/api/v1/' +language+ '/' +token;

axios.get(url + '/championships', {
    headers: { 'Content-Type': 'application/json' },
})
.then(function (response) {
    console.log(response.data);
})
.catch(function (error) {
    console.log(error);
});
    // output
    {
        'status': true,
        'championships': [
            {
                'id': ...,
                'full_name': '...',
                'years': [
                    ...,
                    ...
                ]
            },
            {
                'id': ...,
                'full_name': '...',
                'years': [
                    ...,
                    ...
                ]
            },
            ...
        ]
    }

Show One Championship

import axios from 'axios';
    
    
const language = 'en'; // ['ar', en]
const token    = 'your token here';
const url      = 'https://wacapi.hixvm.com/api/v1/' +language+ '/' +token;
    
axios.get(url + '/championships/1', {
    headers: { 'Content-Type': 'application/json' },
})
.then(function (response) {
    console.log(response.data);
})
.catch(function (error) {
    console.log(error);
});
    // output
    {
        'status': true,
        'championship': {
                'id': ...,
                'full_name': '...',
                'years': [
                    ...,
                    ...
                ]
        }
    }