Skip to content

Commit

Permalink
Merge pull request #37 from ConvertKit/v4-api-methods
Browse files Browse the repository at this point in the history
v4 API: Use Traits from PHP SDK
  • Loading branch information
n7studios authored Apr 18, 2024
2 parents 9a5c6a0 + cc3778d commit e2ebb1f
Show file tree
Hide file tree
Showing 9 changed files with 2,561 additions and 1,366 deletions.
1 change: 1 addition & 0 deletions .env.dist.testing
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ TEST_TABLE_PREFIX=wp_
TEST_SITE_WP_URL=http://127.0.0.1
TEST_SITE_WP_DOMAIN=127.0.0.1
TEST_SITE_ADMIN_EMAIL=wordpress@convertkit.local
CONVERTKIT_API_BROADCAST_ID="8697158"
CONVERTKIT_API_FORM_ID="2765139"
CONVERTKIT_API_LEGACY_FORM_ID="470099"
CONVERTKIT_API_LANDING_PAGE_ID="2765196"
Expand Down
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ TEST_TABLE_PREFIX=wp_
TEST_SITE_WP_URL=http://convertkit.local
TEST_SITE_WP_DOMAIN=convertkit.local
TEST_SITE_ADMIN_EMAIL=wordpress@convertkit.local
CONVERTKIT_API_KEY=
CONVERTKIT_API_SECRET=
CONVERTKIT_OAUTH_ACCESS_TOKEN=
CONVERTKIT_OAUTH_REFRESH_TOKEN=
CONVERTKIT_OAUTH_ACCESS_TOKEN_NO_DATA=
CONVERTKIT_OAUTH_REFRESH_TOKEN_NO_DATA=
CONVERTKIT_OAUTH_CLIENT_ID=
CONVERTKIT_OAUTH_REDIRECT_URI=
CONVERTKIT_API_BROADCAST_ID="8697158"
CONVERTKIT_API_FORM_ID="2765139"
CONVERTKIT_API_LEGACY_FORM_ID="470099"
CONVERTKIT_API_LANDING_PAGE_ID="2765196"
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:
DB_PASS: root
DB_HOST: localhost
INSTALL_PLUGINS: "woocommerce" # Don't include this repository's Plugin here.
CONVERTKIT_API_KEY: ${{ secrets.CONVERTKIT_API_KEY }}
CONVERTKIT_API_SECRET: ${{ secrets.CONVERTKIT_API_SECRET }}
CONVERTKIT_OAUTH_ACCESS_TOKEN: ${{ secrets.CONVERTKIT_OAUTH_ACCESS_TOKEN }}
CONVERTKIT_OAUTH_REFRESH_TOKEN: ${{ secrets.CONVERTKIT_OAUTH_REFRESH_TOKEN }}
CONVERTKIT_OAUTH_ACCESS_TOKEN_NO_DATA: ${{ secrets.CONVERTKIT_OAUTH_ACCESS_TOKEN_NO_DATA }}
Expand Down Expand Up @@ -111,6 +113,8 @@ jobs:
path: ${{ env.PLUGIN_DIR }}/.env.dist.testing
contents: |
CONVERTKIT_API_KEY=${{ env.CONVERTKIT_API_KEY }}
CONVERTKIT_API_SECRET=${{ env.CONVERTKIT_API_SECRET }}
CONVERTKIT_OAUTH_ACCESS_TOKEN=${{ env.CONVERTKIT_OAUTH_ACCESS_TOKEN }}
CONVERTKIT_OAUTH_REFRESH_TOKEN=${{ env.CONVERTKIT_OAUTH_REFRESH_TOKEN }}
CONVERTKIT_OAUTH_ACCESS_TOKEN_NO_DATA=${{ env.CONVERTKIT_OAUTH_ACCESS_TOKEN_NO_DATA }}
Expand Down
3 changes: 3 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
<!-- Exclude minified Javascript files. -->
<exclude-pattern>*.min.js</exclude-pattern>

<!-- Exclude traits from the PHP SDK. -->
<exclude-pattern>class-convertkit-api-traits.php</exclude-pattern>

<!-- Check that code meets WordPress-Extra standards. -->
<rule ref="WordPress-Extra">
<!--
Expand Down
Loading

0 comments on commit e2ebb1f

Please sign in to comment.