@@ -25,14 +25,13 @@ public class GHApp extends GHObject {
2525 private String description ;
2626 @ JsonProperty ("external_url" )
2727 private String externalUrl ;
28- private Map <String ,String > permissions ;
28+ private Map <String , String > permissions ;
2929 private List <GHEvent > events ;
3030 @ JsonProperty ("installations_count" )
3131 private long installationsCount ;
3232 @ JsonProperty ("html_url" )
3333 private String htmlUrl ;
3434
35-
3635 public GHUser getOwner () {
3736 return owner ;
3837 }
@@ -93,7 +92,7 @@ public void setPermissions(Map<String, String> permissions) {
9392 this .permissions = permissions ;
9493 }
9594
96- /*package*/ GHApp wrapUp (GitHub root ) {
95+ /* package */ GHApp wrapUp (GitHub root ) {
9796 this .root = root ;
9897 return this ;
9998 }
@@ -106,67 +105,84 @@ public void setPermissions(Map<String, String> permissions) {
106105 * @see <a href="https://developer.github.com/v3/apps/#list-installations">List installations</a>
107106 * @return a list of App installations
108107 */
109- @ Preview @ Deprecated
108+ @ Preview
109+ @ Deprecated
110110 public PagedIterable <GHAppInstallation > listInstallations () {
111- return root .retrieve ().withPreview (MACHINE_MAN )
112- .asPagedIterable (
113- "/app/installations" ,
114- GHAppInstallation [].class ,
115- item -> item .wrapUp (root ) );
111+ return root .retrieve ().withPreview (MACHINE_MAN ).asPagedIterable ("/app/installations" , GHAppInstallation [].class ,
112+ item -> item .wrapUp (root ));
116113 }
117114
118115 /**
119116 * Obtain an installation associated with this app
120- * @param id - Installation Id
117+ *
118+ * @param id
119+ * Installation Id
121120 *
122- * You must use a JWT to access this endpoint.
121+ * You must use a JWT to access this endpoint.
123122 *
124123 * @see <a href="https://developer.github.com/v3/apps/#get-an-installation">Get an installation</a>
125124 */
126- @ Preview @ Deprecated
125+ @ Preview
126+ @ Deprecated
127127 public GHAppInstallation getInstallationById (long id ) throws IOException {
128- return root .retrieve ().withPreview (MACHINE_MAN ).to (String .format ("/app/installations/%d" , id ), GHAppInstallation .class ).wrapUp (root );
128+ return root .retrieve ().withPreview (MACHINE_MAN )
129+ .to (String .format ("/app/installations/%d" , id ), GHAppInstallation .class ).wrapUp (root );
129130 }
130131
131132 /**
132133 * Obtain an organization installation associated with this app
133- * @param name - Organization name
134+ *
135+ * @param name
136+ * Organization name
134137 *
135- * You must use a JWT to access this endpoint.
138+ * You must use a JWT to access this endpoint.
136139 *
137- * @see <a href="https://developer.github.com/v3/apps/#get-an-organization-installation">Get an organization installation</a>
140+ * @see <a href="https://developer.github.com/v3/apps/#get-an-organization-installation">Get an organization
141+ * installation</a>
138142 */
139- @ Preview @ Deprecated
143+ @ Preview
144+ @ Deprecated
140145 public GHAppInstallation getInstallationByOrganization (String name ) throws IOException {
141- return root .retrieve ().withPreview (MACHINE_MAN ).to (String .format ("/orgs/%s/installation" , name ), GHAppInstallation .class ).wrapUp (root );
146+ return root .retrieve ().withPreview (MACHINE_MAN )
147+ .to (String .format ("/orgs/%s/installation" , name ), GHAppInstallation .class ).wrapUp (root );
142148 }
143149
144150 /**
145151 * Obtain an repository installation associated with this app
146- * @param ownerName - Organization or user name
147- * @param repositoryName - Repository name
152+ *
153+ * @param ownerName
154+ * Organization or user name
155+ * @param repositoryName
156+ * Repository name
148157 *
149- * You must use a JWT to access this endpoint.
158+ * You must use a JWT to access this endpoint.
150159 *
151- * @see <a href="https://developer.github.com/v3/apps/#get-a-repository-installation">Get a repository installation</a>
160+ * @see <a href="https://developer.github.com/v3/apps/#get-a-repository-installation">Get a repository
161+ * installation</a>
152162 */
153- @ Preview @ Deprecated
163+ @ Preview
164+ @ Deprecated
154165 public GHAppInstallation getInstallationByRepository (String ownerName , String repositoryName ) throws IOException {
155- return root .retrieve ().withPreview (MACHINE_MAN ).to (String .format ("/repos/%s/%s/installation" , ownerName , repositoryName ), GHAppInstallation .class ).wrapUp (root );
166+ return root .retrieve ().withPreview (MACHINE_MAN )
167+ .to (String .format ("/repos/%s/%s/installation" , ownerName , repositoryName ), GHAppInstallation .class )
168+ .wrapUp (root );
156169 }
157170
158171 /**
159172 * Obtain a user installation associated with this app
160- * @param name - user name
173+ *
174+ * @param name
175+ * user name
161176 *
162- * You must use a JWT to access this endpoint.
177+ * You must use a JWT to access this endpoint.
163178 *
164179 * @see <a href="https://developer.github.com/v3/apps/#get-a-user-installation">Get a user installation</a>
165180 */
166- @ Preview @ Deprecated
181+ @ Preview
182+ @ Deprecated
167183 public GHAppInstallation getInstallationByUser (String name ) throws IOException {
168- return root .retrieve ().withPreview (MACHINE_MAN ).to (String .format ("/users/%s/installation" , name ), GHAppInstallation .class ).wrapUp (root );
184+ return root .retrieve ().withPreview (MACHINE_MAN )
185+ .to (String .format ("/users/%s/installation" , name ), GHAppInstallation .class ).wrapUp (root );
169186 }
170187
171188}
172-
0 commit comments