Download the PHP package dcard/sdk without Composer

On this page you can find all versions of the php package dcard/sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sdk

dcard-sdk

Help you to access easily the internal and official HTTP Dcard api.

Latest Stable Version Total Downloads Latest Unstable Version License

Dcard HTTP API implementation

We implement the following API methods

The base url is https://www.dcard.tw/

Request url description HTTP method response format the method
/_api/me get account information GET json getMe
/_api/forums get forum lists GET json getForums
/_api/dcard get today "Dcard" GET json getDcard
/_api/notifications get your notifications GET json getNotification
/_api/posts/{post-id} get specified post contents GET json getPostContents
/_api/forums/posts?popular={true/false}&before={post-id} get specified forums's post lists GET json getPostLists
/_api/sessions To login the Dcard Account POST json dcardLogin
/_api/dcard/accept Invite friends POST json sendAccept
/logout logout from the Dcard GET json dcardLogout

If you have to call other api methods, please open issue and let me know your requirement

Usage

Sample code

Unit Testing

I use PHPUnit to test the package.

Here is the steps to test the package.

Step 1

clone the project in master branch.

Step 2

manually download the PHPUnit.phar.

Step 3

download the composer.phar.

Step 4

do in project root folder.

Step 5

create the folder which name is report in project root folder.

Step 6

In DcardTest.php, replace the account and password on line 11 and 28.

Step 7

run testing:

Here is the testing result.

Alt text

Change log

2016/08/13

  1. add invite friend 新增寄送邀請功能

Related project

Dcard-API is developed by Node.js: Dcard-API


All versions of sdk with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ^6.2
symfony/dom-crawler Version ^3.1
symfony/css-selector Version ^3.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dcard/sdk contains the following files

Loading the files please wait ....