Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Update a specific video

Query:

Code Block
    "query": "mutation updateVideoarchiveVideo($input$ids: UpdateVideoInput![ID!]!, $force: Boolean) {\n  updateVideo(inputarchiveVideo(ids: $ids, force: $input$force) {\n    id\n  }\n}"

Query variables:

Code Block
"variables": { "inputids": {[ "id62f241eea0f37003bc0f98e2": "62f241eea0f37003bc0f98e2"], "nameforce": "Title", "playerTag": "62f21de8d83dc72eea644d74", "description": "Description", "iabCategory": "IAB1-3", "clickThroughUrl": "https://www.walla.co.il/" } }

...

false }

Code example:

Code Block
const axios = require("axios");

const url = 'https://manage.aniview.com/api/token?format=json';
const payload = {
    "operationName": "archiveVideo",
    "variables": {
        "ids": [
            "62f241eea0f37003bc0f98e2"
        ],
        "force": false
    },
    "query": "mutation archiveVideo($ids: [ID!]!, $force: Boolean) {\n  archiveVideo(ids: $ids, force: $force) {\n    id\n  }\n}"
}

axios.post(url, {
    'id': 'email',
    'password': 'password',
    'accountId': 'accountId'
})
    .then((response) => {
        apiCall(response.data);
    }, (error) => {
        console.log(error);
    });

function apiCall(auth) {
    axios({
        url: 'https://cms.manage.aniview.com/backend/graphql/',
        method: 'post',
        headers: {
            'Cookie': 'token=' + auth.data.token
        },
        data: payload
    }).then((result) => {
        console.log(result.data[0]);
    });
}