-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathAcceptHeader.php
More file actions
38 lines (29 loc) · 1.18 KB
/
AcceptHeader.php
File metadata and controls
38 lines (29 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php declare(strict_types=1);
namespace ApiClients\Client\Github;
final class AcceptHeader
{
const PRESET_DEFAULT = [
self::CHECK_RUNS,
self::LICENSE,
self::TOPICS,
self::DEFAULT,
];
const PRESET_COMMUNITY_HEALTH = [
self::COMMUNITY_HEALTH,
self::DEFAULT,
];
// Community Health: https://developer.github.com/v3/repos/community/#community-health
const COMMUNITY_HEALTH = 'application/vnd.github.black-panther-preview+json';
// Default header: https://developer.github.com/v3/#current-version
const DEFAULT = 'application/vnd.github.v3+json';
// License on repository object: https://developer.github.com/v3/licenses/#licenses
const LICENSE = 'application/vnd.github.drax-preview+json';
// Topics on repository object: https://developer.github.com/v3/repos/#repositories
const TOPICS = 'application/vnd.github.mercy-preview+json';
// Topics on repository object: https://developer.github.com/v3/repos/#repositories
const CHECK_RUNS = 'application/vnd.github.antiope-preview+json';
public static function getHeader(array $chunks): string
{
return \implode('; ', $chunks);
}
}