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();
Since:
0.1
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    Smart PublicKey with extra features.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    ID Number of this public key.
    User we're in.

    Methods inherited from interface com.jcabi.github.JsonPatchable

    patch

    Methods inherited from interface com.jcabi.github.JsonReadable

    json
  • Method Details

    • user

      User user()
      User we're in.
      Returns:
      User
    • number

      int number()
      ID Number of this public key.
      Returns:
      Public key ID number