Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

541
Views
Cómo usar Anilist API V2 en JavaScript

Traté de usarlo usando los códigos de ejemplo, pero no sé por qué no funciona... Quiero usar anilist Api usando axios en JavaScript, pero los documentos no son fáciles de entender... ( https://anilist .gitbook.io/anilist-apiv2-docs/overview/graphql/getting-started )

Aquí código de ejemplo:

 var query = ` query ($id: Int) { # Define which variables will be used in the query (id) Media (id: $id, type: ANIME) { # Insert our variables into the query arguments (id) (type: ANIME is hard-coded in the query) id title { romaji english native } } } `; var variables = { id: 15125 }; var url = 'https://graphql.anilist.co', options = { method: 'POST', headers: { 'Content-Type': 'application/json', 'Accept': 'application/json', }, body: JSON.stringify({ query: query, variables: variables }) }; fetch(url, options).then(handleResponse) .then(handleData) .catch(handleError); function handleResponse(response) { return response.json().then(function (json) { return response.ok ? json : Promise.reject(json); }); } function handleData(data) { console.log(data); } function handleError(error) { alert('Error, check console'); console.error(error); }

Quiero obtenerlo para poder obtener datos fácilmente dentro de console.log (datos) ¿alguien puede explicarme o ayudarme a usarlo?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!