2626import com .fasterxml .jackson .databind .DeserializationFeature ;
2727import com .fasterxml .jackson .databind .MapperFeature ;
2828import com .fasterxml .jackson .databind .ObjectMapper ;
29- import com .fasterxml .jackson .databind .PropertyNamingStrategy ;
3029import com .fasterxml .jackson .databind .introspect .VisibilityChecker .Std ;
3130import com .infradna .tool .bridge_method_injector .WithBridgeMethods ;
3231import org .apache .commons .codec .Charsets ;
3332import org .apache .commons .codec .binary .Base64 ;
3433import org .apache .commons .io .IOUtils ;
35- import org .apache .commons .lang3 .StringUtils ;
3634
3735import javax .annotation .CheckForNull ;
3836import javax .annotation .Nonnull ;
@@ -266,7 +264,7 @@ public static GitHub offline() {
266264
267265 /**
268266 * Is this an anonymous connection
269- *
267+ *
270268 * @return {@code true} if operations that require authentication will fail.
271269 */
272270 public boolean isAnonymous () {
@@ -275,7 +273,7 @@ public boolean isAnonymous() {
275273
276274 /**
277275 * Is this an always offline "connection".
278- *
276+ *
279277 * @return {@code true} if this is an always offline "connection".
280278 */
281279 public boolean isOffline () {
@@ -764,7 +762,7 @@ public GHAuthorization resetAuth(@Nonnull String clientId, @Nonnull String acces
764762
765763 /**
766764 * Returns a list of all authorizations.
767- *
765+ *
768766 * @see <a href="https://developer.github.com/v3/oauth_authorizations/#list-your-authorizations">List your
769767 * authorizations</a>
770768 */
@@ -802,6 +800,20 @@ public boolean isCredentialValid() {
802800 }
803801 }
804802
803+ /**
804+ * Provides a list of GitHub's IP addresses.
805+ *
806+ * @see <a href="https://developer.github.com/v3/meta/#meta">Get Meta</a>
807+ *
808+ * @return an instance of {@link GHMeta}
809+ * @throws IOException
810+ * if the credentials supplied are invalid or if you're trying to access it as a GitHub App via the JWT
811+ * authentication
812+ */
813+ public GHMeta getMeta () throws IOException {
814+ return retrieve ().to ("/meta" , GHMeta .class );
815+ }
816+
805817 GHUser intern (GHUser user ) throws IOException {
806818 if (user == null )
807819 return user ;
@@ -866,7 +878,7 @@ public void checkApiUrlValidity() throws IOException {
866878 * Checks if a GitHub Enterprise server is configured in private mode.
867879 *
868880 * In private mode response looks like:
869- *
881+ *
870882 * <pre>
871883 * $ curl -i https://github.mycompany.com/api/v3/
872884 * HTTP/1.1 401 Unauthorized
@@ -955,7 +967,7 @@ public GHNotificationStream listNotifications() {
955967
956968 /**
957969 * This provides a dump of every public repository, in the order that they were created.
958- *
970+ *
959971 * @see <a href="https://developer.github.com/v3/repos/#list-all-public-repositories">documentation</a>
960972 */
961973 public PagedIterable <GHRepository > listAllPublicRepositories () {
0 commit comments