Skip to content

Commit

Permalink
add method the incubator
Browse files Browse the repository at this point in the history
  • Loading branch information
vmarchaud committed Jul 24, 2016
1 parent c347392 commit 0aed3de
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions src/main/java/com/pokegoapi/api/inventory/EggIncubator.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package com.pokegoapi.api.inventory;

import POGOProtos.Inventory.EggIncubatorOuterClass;
import POGOProtos.Inventory.EggIncubatorTypeOuterClass.EggIncubatorType;
import POGOProtos.Networking.Requests.Messages.UseItemEggIncubatorMessageOuterClass.UseItemEggIncubatorMessage;
import POGOProtos.Networking.Requests.RequestTypeOuterClass;
import POGOProtos.Networking.Responses.UseItemEggIncubatorResponseOuterClass.UseItemEggIncubatorResponse;
Expand Down Expand Up @@ -86,4 +87,40 @@ public UseItemEggIncubatorResponse.Result hatchEgg(EggPokemon egg)

return response.getResult();
}

/**
* Get incubator id.
*
* @return the id
*/
public String getId() {
return proto.getId();
}

/**
* Get incubator type.
*
* @return EggIncubatorType
*/
public EggIncubatorType getType() {
return proto.getIncubatorType();
}

/**
* Get the target distance for egg to hatch.
*
* @return km distance to hatch the egg
*/
public double getKmTaget() {
return proto.getTargetKmWalked();
}

/**
* Get the current distance walked with this incubator.
*
* @return km walked with an egg
*/
public double getKmWalked() {
return proto.getStartKmWalked();
}
}

0 comments on commit 0aed3de

Please sign in to comment.