bitter / ebay-classifieds-api
Unofficial API for eBay Classifieds.
This package's canonical repository appears to be gone and the package has been frozen as a result.
Requires
- electrolinux/phpquery: ^0.9.6
- guzzlehttp/guzzle: ^6.3
- hmphu/deathbycaptcha: ^1.0
This package is auto-updated.
Last update: 2021-05-30 14:26:04 UTC
README
This is the unofficial API Interface to eBay Classifieds. In this release only rudimentary functionality is implemented like:
- Sign In / Out
- Create Ads
The following functionality is currently NOT implemented:
- Update Ads
- Register
- Forget Password
- Change Password
- Change Email
- Update Master Data
- Search for Ads
- Read Messages
- Send Messages
Preamble
The Name eBay is a registered trademark. The respective rights are on eBay. It is strongly prohibited to use this package for SPAM or similar illegal activities. Since this is an unofficial API, as soon as the eBay Classified site is updated, the extension may no longer work.
Features
- Compatible with PHP 5.5 or greater.
- Easy to install with Composer.
- Compliant with PSR-1, PSR-2 and PSR-4.
Requirements
- PHP 5.5 or greater with the following extensions:
- cURL
- SSL enabled on the cURL extension so that https requests can be made.
Installation
The API can be installed with Composer.
- Install Composer.
curl -sS https://getcomposer.org/installer | php
- Install the API.
php composer.phar require bitter/ebay_classifieds_api
- Require Composer's autoloader by adding the following line to your code.
require 'vendor/autoload.php';
Example Usage
This peace of code signs in into your account and create an ad on eBay Classifieds beneath the category "Give Away".
<?php require_once('./vendor/autoload.php'); use Bitter\EbayClassifiedsApi\Account\Services\AccountService; use Bitter\EbayClassifiedsApi\Advertisement\Enums\AdType; use Bitter\EbayClassifiedsApi\Advertisement\Enums\PriceType; use Bitter\EbayClassifiedsApi\Advertisement\Enums\Category; $accountService = AccountService::getInstance(); $accountService ->setEmail("YOUR_USERNAME") ->setPassword("YOUR_PASSWORD") ->login(); if ($accountService->isLogin()) { $accountService->getAdvertisements()->createAd(Category::ZU_VERSCHENKEN_TAUSCHEN_ZU_VERSCHENKEN) ->setTitle("This is a Title") ->setDescription("This is a example description") ->setZipCode("50939") ->setCity("Köln") ->setContactName("Max Mustermann") ->setContactPhoneNumber("0123456") ->setAdType(AdType::OFFER) ->publish(); }
License
Licensed under the MIT License