AgentFeeble / pgoapi

A Pokèmon Go API written in swift.
17 stars 3 forks source link

MapObjects doesn't return wildPokemons #2

Closed ytakzk closed 8 years ago

ytakzk commented 8 years ago

It has spawnPoints but we cannot know the Pokemon index, name and the existing time which should be known in WildPokemon.

Optional( mapCells[0] {
   s2CellId: 2203687655533707264 
   currentTimestampMs: 1469977344263 
   spawnPoints[0] {
     latitude: -26.1588017788219 
     longitude: 28.1402918414592 
  }
   spawnPoints[1] {
     latitude: -26.1568103484896 
     longitude: 28.1401089915328 
  }
   spawnPoints[2] {
     latitude: -26.1588283179348 
     longitude: 28.1405661159889 
  }
}
 mapCells[1] {
   s2CellId: 2203687657681190912 
   currentTimestampMs: 1469977344263 
   spawnPoints[0] {
     latitude: -26.1571442095724 
     longitude: 28.1377319250185 
  }
   spawnPoints[1] {
     latitude: -26.1576130558483 
     longitude: 28.1379147774406 
  }
}
 mapCells[2] {
   s2CellId: 2203687651238739968 
   currentTimestampMs: 1469977344263 
}
 mapCells[3] {
   s2CellId: 2203687653386223616 
   currentTimestampMs: 1469977344263 
   spawnPoints[0] {
     latitude: -26.1598190432121 
     longitude: 28.1414803613006 
  }
   spawnPoints[1] {
     latitude: -26.1601573926951 
     longitude: 28.1414803613006 
  }
   spawnPoints[2] {
     latitude: -26.1594325964416 
     longitude: 28.1401089915328 
  }
   spawnPoints[3] {
     latitude: -26.1593308689579 
     longitude: 28.1413889369855 
  }
}
....
mapCells[16] {
   s2CellId: 2203687672713576448 
   currentTimestampMs: 1469977344263 
   forts[0] {
     id: dc57d98551f9499cb371045d07507c95.16 
     lastModifiedTimestampMs: 1469967303933 
     latitude: -26.147292 
     longitude: 28.1396 
     ownedByTeam: .Yellow
     guardPokemonId: .Poliwrath
     enabled: true 
     gymPoints: 10521 
  }
}
 mapCells[17] {
   s2CellId: 2203687674861060096 
   currentTimestampMs: 1469977344263 
}
 mapCells[18] {
   s2CellId: 2203687668418609152 
   currentTimestampMs: 1469977344263 
   forts[0] {
     id: e9fddddf6cd142ccb689ea021a5493d2.16 
     lastModifiedTimestampMs: 1469888362977 
     latitude: -26.151595 
     longitude: 28.136335 
     enabled: true 
     types: .Checkpoint
  }
}
 mapCells[19] {
   s2CellId: 2203687670566092800 
   currentTimestampMs: 1469977344263 
}
 mapCells[20] {
   s2CellId: 2203687694188412928 
   currentTimestampMs: 1469977344263 
}
 status: .Success
)
AgentFeeble commented 8 years ago

I think you're confusing the SpawnPoint model with the WildPokemon, MapPokemon, or NearbyPokemon models, which are working, and look like this:

▿ Optional<MapCell>
  ▿ Some :  s2CellId: ...
 currentTimestampMs: 1469981241556 
 wildPokemons[0] {
   encounterId: 9327482799299827181 
   lastModifiedTimestampMs: 1469981241556 
   latitude: ...
   longitude: ...
   spawnPointId: 1e95124462d 
   pokemonData {
     pokemonId: .Zubat
   }
   timeTillHiddenMs: 508000 
}
 catchablePokemons[0] {
   spawnPointId: 1e95124462d 
   encounterId: 9327482799299827181 
   pokemonId: .Zubat
   expirationTimestampMs: 1469981749556 
   latitude: ...
   longitude: ...
}
 nearbyPokemons[0] {
   pokemonId: .Zubat
   distanceInMeters: 200.0 
   encounterId: 9327482799299827181 
}

Try searching using different coordinates, or let me know if I'm misunderstanding you

beeb commented 8 years ago

Quick question on the matter, what's the search radius like with one execution (21 cells)?

AgentFeeble commented 8 years ago

I'm not too sure hey, I don't have much experience with the S2 library.

AgentFeeble commented 8 years ago

Closing this until anyone brings up anything new