Skip to content

Commit

Permalink
Merge pull request Grover-c13#180 from vmarchaud/Development
Browse files Browse the repository at this point in the history
add method for the incubator
  • Loading branch information
Grover-c13 authored Jul 24, 2016
2 parents 3204bb7 + 6178463 commit f91890a
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 getKmTarget() {
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 f91890a

Please sign in to comment.