Package com.jcabi.github
Interface PublicKey
-
- All Superinterfaces:
JsonPatchable
,JsonReadable
- All Known Implementing Classes:
PublicKey.Smart
@Immutable public interface PublicKey extends JsonReadable, JsonPatchable
Github public key.PublicKey implements
JsonReadable
, that's how you can get its full details in JSON format. For example, to get its title, you get the entire JSON and then gets its element:String title = key.json().getString("title");
However, it's better to use a supplementary "smart" decorator, which automates most of these operations:
String title = new PublicKey.Smart(comment).title();
- Version:
- $Id: e5698ddb8a30e7f7c0d637cca1961b45685f2a6f $
- Author:
- Carlos Miranda (miranda.cma@gmail.com)
- See Also:
- Public Keys API
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
PublicKey.Smart
Smart PublicKey with extra features.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
number()
ID Number of this public key.User
user()
User we're in.-
Methods inherited from interface com.jcabi.github.JsonPatchable
patch
-
Methods inherited from interface com.jcabi.github.JsonReadable
json
-
-
-
-
Method Detail
-
user
User user()
User we're in.- Returns:
- User
-
number
int number()
ID Number of this public key.- Returns:
- Public key ID number
-
-