1111 */
1212class Apps extends AbstractApi
1313{
14- use AcceptHeaderTrait;
15-
16- private function configurePreviewHeader ()
17- {
18- $ this ->acceptHeaderValue = 'application/vnd.github.machine-man-preview+json ' ;
19- }
20-
2114 /**
2215 * Create an access token for an installation.
2316 *
@@ -36,8 +29,6 @@ public function createInstallationToken($installationId, $userId = null)
3629 $ parameters ['user_id ' ] = $ userId ;
3730 }
3831
39- $ this ->configurePreviewHeader ();
40-
4132 return $ this ->post ('/app/installations/ ' .$ installationId .'/access_tokens ' , $ parameters );
4233 }
4334
@@ -50,8 +41,6 @@ public function createInstallationToken($installationId, $userId = null)
5041 */
5142 public function findInstallations ()
5243 {
53- $ this ->configurePreviewHeader ();
54-
5544 return $ this ->get ('/app/installations ' );
5645 }
5746
@@ -66,8 +55,6 @@ public function findInstallations()
6655 */
6756 public function getInstallation ($ installationId )
6857 {
69- $ this ->configurePreviewHeader ();
70-
7158 return $ this ->get ('/app/installations/ ' .$ installationId );
7259 }
7360
@@ -82,8 +69,6 @@ public function getInstallation($installationId)
8269 */
8370 public function getInstallationForOrganization ($ org )
8471 {
85- $ this ->configurePreviewHeader ();
86-
8772 return $ this ->get ('/orgs/ ' .rawurldecode ($ org ).'/installation ' );
8873 }
8974
@@ -99,8 +84,6 @@ public function getInstallationForOrganization($org)
9984 */
10085 public function getInstallationForRepo ($ owner , $ repo )
10186 {
102- $ this ->configurePreviewHeader ();
103-
10487 return $ this ->get ('/repos/ ' .rawurldecode ($ owner ).'/ ' .rawurldecode ($ repo ).'/installation ' );
10588 }
10689
@@ -115,8 +98,6 @@ public function getInstallationForRepo($owner, $repo)
11598 */
11699 public function getInstallationForUser ($ username )
117100 {
118- $ this ->configurePreviewHeader ();
119-
120101 return $ this ->get ('/users/ ' .rawurldecode ($ username ).'/installation ' );
121102 }
122103
@@ -129,8 +110,6 @@ public function getInstallationForUser($username)
129110 */
130111 public function removeInstallation ($ installationId )
131112 {
132- $ this ->configurePreviewHeader ();
133-
134113 $ this ->delete ('/app/installations/ ' .$ installationId );
135114 }
136115
@@ -150,8 +129,6 @@ public function listRepositories($userId = null)
150129 $ parameters ['user_id ' ] = $ userId ;
151130 }
152131
153- $ this ->configurePreviewHeader ();
154-
155132 return $ this ->get ('/installation/repositories ' , $ parameters );
156133 }
157134
@@ -167,8 +144,6 @@ public function listRepositories($userId = null)
167144 */
168145 public function addRepository ($ installationId , $ repositoryId )
169146 {
170- $ this ->configurePreviewHeader ();
171-
172147 return $ this ->put ('/installations/ ' .$ installationId .'/repositories/ ' .$ repositoryId );
173148 }
174149
@@ -184,8 +159,6 @@ public function addRepository($installationId, $repositoryId)
184159 */
185160 public function removeRepository ($ installationId , $ repositoryId )
186161 {
187- $ this ->configurePreviewHeader ();
188-
189162 return $ this ->delete ('/installations/ ' .$ installationId .'/repositories/ ' .$ repositoryId );
190163 }
191164
0 commit comments