-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
26 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
// Copyright (c) 2021 Harry [Majored] [[email protected]] | ||
// MIT License (https://github.com/Majored/php-mcm-api-wrapper/blob/main/LICENSE) | ||
// MIT License (https://github.com/Majored/php-bbb-api-wrapper/blob/main/LICENSE) | ||
|
||
require __DIR__ . "/../src/APIWrapper.php"; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<?php | ||
// Copyright (c) 2021 Harry [Majored] [[email protected]] | ||
// MIT License (https://github.com/Majored/php-mcm-api-wrapper/blob/main/LICENSE) | ||
// MIT License (https://github.com/Majored/php-bbb-api-wrapper/blob/main/LICENSE) | ||
|
||
/** Represents a parsed response from MC-Market's API. */ | ||
/** Represents a parsed response from BuiltByBit's API. */ | ||
class APIResponse { | ||
/** @var string A string representing whether this response was successful or not. */ | ||
private $result; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
// Copyright (c) 2021 Harry [Majored] [[email protected]] | ||
// MIT License (https://github.com/Majored/php-mcm-api-wrapper/blob/main/LICENSE) | ||
// MIT License (https://github.com/Majored/php-bbb-api-wrapper/blob/main/LICENSE) | ||
|
||
/** Stores data about a particular API token. */ | ||
class APIToken { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
// Copyright (c) 2021 Harry [Majored] [[email protected]] | ||
// MIT License (https://github.com/Majored/php-mcm-api-wrapper/blob/main/LICENSE) | ||
// MIT License (https://github.com/Majored/php-bbb-api-wrapper/blob/main/LICENSE) | ||
|
||
require __DIR__ . "/APIToken.php"; | ||
require __DIR__ . "/APIResponse.php"; | ||
|
@@ -19,10 +19,10 @@ | |
require __DIR__ . "/helpers/Resources/UpdatesHelper.php"; | ||
require __DIR__ . "/helpers/Resources/ReviewsHelper.php"; | ||
|
||
/** The primary class for interactions with MC-Market's API. */ | ||
/** The primary class for interactions with BuiltByBit's API. */ | ||
class APIWrapper { | ||
/** @var string The base URL of MC-Market's API that we prepend to endpoints. */ | ||
const BASE_URL = "https://api.mc-market.org/v1"; | ||
/** @var string The base URL of BuiltByBit's API that we prepend to endpoints. */ | ||
const BASE_URL = "https://api.builtbybit.com/v1"; | ||
|
||
/** @var string The complete header line for request bodies (JSON). */ | ||
const CONTENT_TYPE_HEADER = "Content-Type: application/json"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
// Copyright (c) 2021 Harry [Majored] [[email protected]] | ||
// MIT License (https://github.com/Majored/php-mcm-api-wrapper/blob/main/LICENSE) | ||
// MIT License (https://github.com/Majored/php-bbb-api-wrapper/blob/main/LICENSE) | ||
|
||
/** Stores metadata needed for local request throttling. */ | ||
class Throttler { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
// Copyright (c) 2021 Harry [Majored] [[email protected]] | ||
// MIT License (https://github.com/Majored/php-mcm-api-wrapper/blob/main/LICENSE) | ||
// MIT License (https://github.com/Majored/php-bbb-api-wrapper/blob/main/LICENSE) | ||
|
||
/** A helper class for alert-related API endpoints. */ | ||
class AlertsHelper { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
// Copyright (c) 2021 Harry [Majored] [[email protected]] | ||
// MIT License (https://github.com/Majored/php-mcm-api-wrapper/blob/main/LICENSE) | ||
// MIT License (https://github.com/Majored/php-bbb-api-wrapper/blob/main/LICENSE) | ||
|
||
/** A helper class for conversation-related API endpoints. */ | ||
class ConversationsHelper { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
// Copyright (c) 2021 Harry [Majored] [[email protected]] | ||
// MIT License (https://github.com/Majored/php-mcm-api-wrapper/blob/main/LICENSE) | ||
// MIT License (https://github.com/Majored/php-bbb-api-wrapper/blob/main/LICENSE) | ||
|
||
/** A helper class for member-related API endpoints. */ | ||
class MembersHelper { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
// Copyright (c) 2021 Harry [Majored] [[email protected]] | ||
// MIT License (https://github.com/Majored/php-mcm-api-wrapper/blob/main/LICENSE) | ||
// MIT License (https://github.com/Majored/php-bbb-api-wrapper/blob/main/LICENSE) | ||
|
||
/** A helper class for thread-related API endpoints. */ | ||
class ThreadsHelper { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
// Copyright (c) 2021 Harry [Majored] [[email protected]] | ||
// MIT License (https://github.com/Majored/php-mcm-api-wrapper/blob/main/LICENSE) | ||
// MIT License (https://github.com/Majored/php-bbb-api-wrapper/blob/main/LICENSE) | ||
|
||
/** A helper class for download-related API endpoints. */ | ||
class DownloadsHelper { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
// Copyright (c) 2021 Harry [Majored] [[email protected]] | ||
// MIT License (https://github.com/Majored/php-mcm-api-wrapper/blob/main/LICENSE) | ||
// MIT License (https://github.com/Majored/php-bbb-api-wrapper/blob/main/LICENSE) | ||
|
||
/** A helper class for license-related API endpoints. */ | ||
class LicensesHelper { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
// Copyright (c) 2021 Harry [Majored] [[email protected]] | ||
// MIT License (https://github.com/Majored/php-mcm-api-wrapper/blob/main/LICENSE) | ||
// MIT License (https://github.com/Majored/php-bbb-api-wrapper/blob/main/LICENSE) | ||
|
||
/** A helper class for purchase-related API endpoints. */ | ||
class PurchasesHelper { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
// Copyright (c) 2021 Harry [Majored] [[email protected]] | ||
// MIT License (https://github.com/Majored/php-mcm-api-wrapper/blob/main/LICENSE) | ||
// MIT License (https://github.com/Majored/php-bbb-api-wrapper/blob/main/LICENSE) | ||
|
||
/** A helper class for resource-related API endpoints. */ | ||
class ResourcesHelper { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
// Copyright (c) 2021 Harry [Majored] [[email protected]] | ||
// MIT License (https://github.com/Majored/php-mcm-api-wrapper/blob/main/LICENSE) | ||
// MIT License (https://github.com/Majored/php-bbb-api-wrapper/blob/main/LICENSE) | ||
|
||
/** A helper class for review-related API endpoints. */ | ||
class ReviewsHelper { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
// Copyright (c) 2021 Harry [Majored] [[email protected]] | ||
// MIT License (https://github.com/Majored/php-mcm-api-wrapper/blob/main/LICENSE) | ||
// MIT License (https://github.com/Majored/php-bbb-api-wrapper/blob/main/LICENSE) | ||
|
||
/** A helper class for update-related API endpoints. */ | ||
class UpdatesHelper { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
// Copyright (c) 2021 Harry [Majored] [[email protected]] | ||
// MIT License (https://github.com/Majored/php-mcm-api-wrapper/blob/main/LICENSE) | ||
// MIT License (https://github.com/Majored/php-bbb-api-wrapper/blob/main/LICENSE) | ||
|
||
/** A helper class for version-related API endpoints. */ | ||
class VersionsHelper { | ||
|