Skip to content

Commit

Permalink
feat: added new endpoints (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aviortheking authored Dec 15, 2021
1 parent 7dc594b commit 3aa0343
Show file tree
Hide file tree
Showing 15 changed files with 662 additions and 309 deletions.
16 changes: 7 additions & 9 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.159.0/containers/php/.devcontainer/base.Dockerfile

# [Choice] PHP version: 8, 8.0, 7, 7.4, 7.3
ARG VARIANT="7.3"
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.195.0/containers/php/.devcontainer/base.Dockerfile
# [Choice] PHP version (use -bullseye variants on local arm64/Apple Silicon): 8, 8.0, 7, 7.4, 7.3, 8-bullseye, 8.0-bullseye, 7-bullseye, 7.4-bullseye, 7.3-bullseye, 8-buster, 8.0-buster, 7-buster, 7.4-buster, 7.3-buster
ARG VARIANT=7.4
FROM mcr.microsoft.com/vscode/devcontainers/php:0-${VARIANT}

# [Option] Install Node.js
ARG INSTALL_NODE="true"
ARG NODE_VERSION="lts/*"
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
ARG NODE_VERSION="none"
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

# [Optional] Uncomment this line to install global node packages.
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
"build": {
"dockerfile": "Dockerfile",
"args": {
// Use oldest supported version: https://www.php.net/supported-versions.php
// Update VARIANT to pick a PHP version: 8, 8.0, 7, 7.4, 7.3
"VARIANT": "7.3",
"VARIANT": "7.4",
"INSTALL_NODE": "false",
"NODE_VERSION": "lts/*"
}
Expand Down
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/.* export-ignore
/composer.lock export-ignore
/*.xml export-ignore
* text=auto eol=lf
25 changes: 13 additions & 12 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ jobs:
build:

runs-on: ubuntu-latest
# strategy:
# matrix:
# php-versions: ['7.3', '7.4', '8.0']
# phpunit-versions: ['latest']
strategy:
matrix:
php-versions: ['7.4', '8.0', '8.1']
phpunit-versions: ['latest']

steps:
- uses: actions/checkout@v2

# - name: Setup PHP
# uses: shivammathur/setup-php@v2
# with:
# php-version: ${{ matrix.php-versions }}
# # extensions: mbstring, intl
# ini-values: post_max_size=256M, max_execution_time=180
# coverage: xdebug
# tools: php-cs-fixer, phpunit
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
# extensions: mbstring, intl
ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug
tools: php-cs-fixer, phpunit

- name: Validate composer.json and composer.lock
run: composer validate --strict
Expand All @@ -40,6 +40,7 @@ jobs:
run: composer run-script test

- uses: codecov/codecov-action@v1.0.13
if: matrix.php-versions == '8.1'
with:
# Comma-separated list of files to upload
files: ./tmp/code-coverage.xml
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<p align="center">
<a href="https://packagist.org/packages/tcgdex/sdk">
<img src="https://img.shields.io/github/v/release/tcgdex/php-sdk?include_prereleases&style=flat-square" alt="Packagist Version">
</a>
<a href="https://packagist.org/packages/tcgdex/sdk">
<img src="https://img.shields.io/packagist/dm/tcgdex/sdk?style=flat-square" alt="NPM Downloads">
</a>
<a href="https://app.codecov.io/gh/tcgdex/php-sdk/">
<img src="https://img.shields.io/codecov/c/github/tcgdex/php-sdk?style=flat-square&token=MCENGBDCXN" alt="npm version">
</a>
<a href="https://github.com/tcgdex/php-sdk/blob/master/LICENSE.md">
<img src="https://img.shields.io/github/license/tcgdex/php-sdk?style=flat-square" alt="the TCGdex PHP SDK is released under the MIT license." />
</a>
<a href="https://github.com/tcgdex/php-sdk/actions/workflows/build-test.yml">
<img src="https://img.shields.io/github/workflow/status/tcgdex/php-sdk/Build%20&%20Test?style=flat-square" alt="the TCGdex PHP SDK's automated builds." />
</a>
<a href="https://discord.gg/NehYTAhsZE">
<img src="https://img.shields.io/discord/857231041261076491?color=%235865F2&label=Discord&style=flat-square" alt="Discord Link">
</a>
<a href="https://packagist.org/packages/tcgdex/sdk">
<img src="https://img.shields.io/github/v/release/tcgdex/php-sdk?include_prereleases&style=flat-square" alt="Packagist Version">
</a>
<a href="https://packagist.org/packages/tcgdex/sdk">
<img src="https://img.shields.io/packagist/dm/tcgdex/sdk?style=flat-square" alt="NPM Downloads">
</a>
<a href="https://app.codecov.io/gh/tcgdex/php-sdk/">
<img src="https://img.shields.io/codecov/c/github/tcgdex/php-sdk?style=flat-square&token=MCENGBDCXN" alt="npm version">
</a>
<a href="https://github.com/tcgdex/php-sdk/blob/master/LICENSE.md">
<img src="https://img.shields.io/github/license/tcgdex/php-sdk?style=flat-square" alt="the TCGdex PHP SDK is released under the MIT license." />
</a>
<a href="https://github.com/tcgdex/php-sdk/actions/workflows/build-test.yml">
<img src="https://img.shields.io/github/workflow/status/tcgdex/php-sdk/Build%20&%20Test?style=flat-square" alt="the TCGdex PHP SDK's automated builds." />
</a>
<a href="https://discord.gg/NehYTAhsZE">
<img src="https://img.shields.io/discord/857231041261076491?color=%235865F2&label=Discord&style=flat-square" alt="Discord Link">
</a>
</p>

# TCGdex PHP SDK
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
],
"minimum-stability": "stable",
"require": {
"php": ">=7.3",
"php": ">=7.4",
"psr/http-client": "^1.0",
"psr/simple-cache": "^1.0"
},
Expand Down
Loading

0 comments on commit 3aa0343

Please sign in to comment.