Comments (18)
Yes, they did, and it's pretty heavy.
https://www.reddit.com/r/pokemongodev/comments/4w1cvr/pokemongo_current_api_status/
from pokemongoapi-php.
I tried to call this function from NicklasW\PkmGoApi\Services\Request\MapRequestService:
public function getResources($latitude, $longitude)
{
// Retrieve a list of cell ids from the latitude and longitude
$cellIds = S2::getCellIds($latitude, $longitude);
// Retrieve the map resources
$resources = $this->getRequestService()->getResources($latitude, $longitude, $cellIds);
print_r('Resources: '.$resources);
}
But it return all the array void:
forts=>array(
)
spawn_points=>array(
)
deleted_objects=>array(
)
fort_summaries=>array(
)
decimated_spawn_points=>array(
)
wild_pokemons=>array(
)
catchable_pokemons=>array(
)
nearby_pokemons=>array(
)
Do you know how can I fix it?
from pokemongoapi-php.
The Map API is not done yet, you'll have to wait a bit more ;)
from pokemongoapi-php.
You could try this snippet while you wait.
$application = new ApplicationKernel('INSERT_USER', 'INSERT_PASSWORD', Factory::AUTHENTICATION_TYPE_PTC);
$application->setLocation(INSERT_LATITUDE, INSERT_LONGITUDE);
$map = new Map();
$map->update();
var_dump($map->getPokestops());
from pokemongoapi-php.
Thank you so much! If I can help you, let me know!
Only one time getPokestops() gave me a complete array, but now is always void!
That is an example of what I've received:
[0]=>
object(NicklasW\PkmGoApi\Api\Map\Data\Resources\Fort)#50 (16) {
["id":protected]=>
string(35) "2bb412d263b2457881354a707c779cc6.16"
["lastModifiedTimestampMs":protected]=>
int(1470036347544)
["latitude":protected]=>
float(52.588293)
["longitude":protected]=>
float(-2.115976)
["enabled":protected]=>
bool(true)
["type":protected]=>
int(1)
["ownedByTeam":protected]=>
int(0)
["guardPokemonId":protected]=>
int(0)
["guardPokemonCp":protected]=>
int(0)
["gymPoints":protected]=>
int(0)
["isInBattle":protected]=>
bool(false)
["cooldownCompleteTimestampMs":protected]=>
int(0)
["sponsor":protected]=>
int(0)
["renderingType":protected]=>
int(0)
["activeFortModifier":protected]=>
string(0) ""
["lureInfo":protected]=>
NULL
}
[1]=>
object(NicklasW\PkmGoApi\Api\Map\Data\Resources\Fort)#639 (16) {
["id":protected]=>
string(35) "94dbfe8dfb9d4785a5e6fe10085756f9.16"
["lastModifiedTimestampMs":protected]=>
int(1470047822589)
["latitude":protected]=>
float(52.596062)
["longitude":protected]=>
float(-2.114933)
["enabled":protected]=>
bool(true)
["type":protected]=>
int(1)
["ownedByTeam":protected]=>
int(0)
["guardPokemonId":protected]=>
int(0)
["guardPokemonCp":protected]=>
int(0)
["gymPoints":protected]=>
int(0)
["isInBattle":protected]=>
bool(false)
["cooldownCompleteTimestampMs":protected]=>
int(0)
["sponsor":protected]=>
int(0)
["renderingType":protected]=>
int(0)
["activeFortModifier":protected]=>
string(0) ""
["lureInfo":protected]=>
NULL
}
Do you know where is the name of the PokeStop?
I look forward to getNearbyPokemon ;)
from pokemongoapi-php.
Names are only in the fort details response, which I think is not exposed yet.
But I'm also waiting for this to be implemented, I like the clean API already :)
from pokemongoapi-php.
....
$application->setLocation(INSERT_LATITUDE, INSERT_LONGITUDE);
$map = new Map();
$map->update();
var_dump($map->getPokestops());
....
Returns the following:
Parse error: syntax error, unexpected 'DEFAULT' (T_DEFAULT), expecting identifier (T_STRING) or class (T_CLASS) in /home/www/..../res/POGOProtos/Map/Fort/FortData.php on line 33
from pokemongoapi-php.
Replace INSERT_LATITUDE and INSERT_LONGITUDE with valid values.
from pokemongoapi-php.
$application->setLocation(47.466582, 9.750203);
$map = new Map();
$map->update();
var_dump($map->getPokestops());
returns :
Parse error: syntax error, unexpected 'DEFAULT' (T_DEFAULT), expecting identifier (T_STRING) or class (T_CLASS) in /home/www/..../res/POGOProtos/Map/Fort/FortData.php on line 33
from pokemongoapi-php.
Which PHP version are you using? This sounds like a very old one.
from pokemongoapi-php.
Version 5.6.22, should update to v7 asap
from pokemongoapi-php.
I was wrong, it's not the class constants, but a reserved word, just get the newest version.
PHP 5.6 should work fine, anyways.
from pokemongoapi-php.
Hi @NicklasWallgren any idea on the Map API release date? :)
from pokemongoapi-php.
Looks like Niantic changed something again, get no response(empty array) for getPokestops() & getGyms.
from pokemongoapi-php.
The login and getProfileData is still working!
Do you know how can I retrieve the "gyms currently conquered" value?
I didn't find it! Thanks!
from pokemongoapi-php.
Is map data working now? or no?
If it is, an example to get Pokestops and Gyms would be awesome.
from pokemongoapi-php.
Nope, needs to wait for #65
from pokemongoapi-php.
The old method does not work:
$application->setLocation(47.466582, 9.750203);
$map = new Map();
$map->update();
var_dump($map->getPokestops());
How can I get the list of Pokestops with the new version of API?
from pokemongoapi-php.
Related Issues (20)
- Exception about reading the full length HOT 1
- Call to a member function getOptions() on null HOT 5
- Fatal error: Call to a member function getType() on null HOT 15
- Update vendor/nicklasw/pkm-go-api/src/Api/Pokemon/Data/PokemonMetaRegistry.php HOT 6
- Where did getType1String() go? HOT 2
- More problems with move sets and pokemon types. HOT 9
- Pokémon Go 0.51.2 API using public hashing server HOT 2
- User Profile Details HOT 4
- When retrieving pokedex new baby eggs are missing HOT 2
- Authentification Exception (sometimes) HOT 3
- Hashing Server HOT 5
- language problem HOT 3
- Fatal error: Uncaught Exception: Retrieved a unknown status code 100 HOT 22
- Retrieved a invalid response. Response code: '403' HOT 2
- Slack and Status update? HOT 2
- Composer not run HOT 4
- Laravel begginer problem HOT 1
- Even after installing composer I'm getting the same error
- 403 Forbidden
- api credentials HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pokemongoapi-php.