Pokego-Scan 介绍
Pokego-Scan 通过 PokeVision API实现口袋妖怪扫描的Node包。
使用:
$ npm install pokego-scan var pokegoScan = require('pokego-scan'); var coords = { latitude: 40.4164737, longitude: -3.7042757 }; // obtain an array of pokemon close to the given coordinates pokegoScan(coords, function(err, pokemon) { if (err) throw err; console.log(pokemon); }); /* returns: [ { id: '23578871', data: '[]', expiration_time: 1469133198, pokemonId: '56', latitude: 40.41668174482, longitude: -3.7048426265191, uid: '0d422880aed:23', is_alive: true, name: 'Mankey', map: 'https://pokevision.com/#/@40.41668174482,-3.7048426265191', image: 'https://ugc.pokevision.com/images/pokemon/56.png', distance: 53, distance_str: '53m', despawns_in: 603, despawns_in_str: '10:03' }, ... ] */ // filter by max distance pokegoScan(coords, {distance: 100}, function(err, pokemon) { if (err) throw err; console.log(pokemon); }); // filter by specific pokemon pokegoScan(coords, {filter: ["Zubat", "Pidgey"]}, function(err, pokemon) { if (err) throw err; console.log(pokemon); });
Pokego-Scan 官网
https://github.com/dgoguerra/pokego-scan
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。