-
Notifications
You must be signed in to change notification settings - Fork 29
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
45 changed files
with
2,786 additions
and
21 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
require __DIR__ . '/../../vendor/autoload.php'; | ||
|
||
use SteamApi\SteamApi; | ||
|
||
$api = new SteamApi(); | ||
|
||
// Cookies for steamcommunity.com | ||
$cookies = 'sessionid=*********; steamCountry=****************; steamLoginSecure=**************;'; | ||
|
||
$formData = [ | ||
'partner_id' => 76531274732642783 | ||
]; | ||
|
||
|
||
dd($api->detailed() | ||
->withCustomCurlOpts([CURLOPT_COOKIEFILE => 'absolute_path_to_cookie_file']) // with cookie file | ||
->withCookies($cookies) // or with cookies from string or array | ||
->acceptTradeOffer(5654234726, $formData)); |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
require __DIR__ . '/../../vendor/autoload.php'; | ||
|
||
use SteamApi\SteamApi; | ||
|
||
$api = new SteamApi(); | ||
|
||
// Cookies for steamcommunity.com | ||
$cookies = 'sessionid=*********; steamCountry=****************; steamLoginSecure=**************;'; | ||
|
||
|
||
dd($api->detailed() | ||
->withCustomCurlOpts([CURLOPT_COOKIEFILE => 'absolute_path_to_cookie_file']) // with cookie file | ||
->withCookies($cookies) // or with cookies from string or array | ||
->cancelTradeOffer(5461827369)); |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
require __DIR__ . '/../../vendor/autoload.php'; | ||
|
||
use SteamApi\SteamApi; | ||
|
||
$api = new SteamApi(); | ||
|
||
// Cookies for steamcommunity.com | ||
$cookies = 'sessionid=*********; steamCountry=****************; steamLoginSecure=**************;'; | ||
|
||
$tradeLink = 'https://steamcommunity.com/tradeoffer/new/?partner=152735263&token=g82gdgy2d'; | ||
|
||
$formData = [ | ||
'partner_id' => 76531274732642783, //optional | ||
'message' => 'message', //optional | ||
'my_items' => [ | ||
[ | ||
"app_id" => 730, | ||
"context_id" => "2", | ||
"amount" => 1, | ||
"asset_id" => "28738189184" | ||
], | ||
], | ||
'partner_items' => [] | ||
]; | ||
|
||
|
||
dd($api->detailed() | ||
->withCustomCurlOpts([CURLOPT_COOKIEFILE => 'absolute_path_to_cookie_file']) // with cookie file | ||
->withCookies($cookies) // or with cookies from string or array | ||
->createTradeOffer($tradeLink, $formData)); |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
require __DIR__ . '/../../vendor/autoload.php'; | ||
|
||
use SteamApi\SteamApi; | ||
|
||
$api = new SteamApi(); | ||
|
||
// Cookies for steamcommunity.com | ||
$cookies = 'sessionid=*********; steamCountry=****************; steamLoginSecure=**************;'; | ||
|
||
|
||
dd($api->detailed() | ||
->withCustomCurlOpts([CURLOPT_COOKIEFILE => 'absolute_path_to_cookie_file']) // with cookie file | ||
->withCookies($cookies) // or with cookies from string or array | ||
->declineTradeOffer(5378282881)); |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
require __DIR__ . '/../../vendor/autoload.php'; | ||
|
||
use SteamApi\SteamApi; | ||
|
||
$api = new SteamApi(); | ||
|
||
// Cookies for steamcommunity.com | ||
$cookies = 'sessionid=*********; steamCountry=****************; steamLoginSecure=**************;'; | ||
|
||
$options = [ | ||
'history' => false //optional | ||
]; | ||
|
||
|
||
dd($api->detailed() | ||
->withCustomCurlOpts([CURLOPT_COOKIEFILE => 'absolute_path_to_cookie_file']) // with cookie file | ||
->withCookies($cookies) // or with cookies from string or array | ||
->getIncomingOffers($options)); |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
require __DIR__ . '/../../vendor/autoload.php'; | ||
|
||
use SteamApi\SteamApi; | ||
|
||
$api = new SteamApi(); | ||
|
||
// Cookies for steamcommunity.com | ||
$cookies = 'sessionid=*********; steamCountry=****************; steamLoginSecure=**************;'; | ||
|
||
$formData = [ | ||
'partner_id' => 76531274732642783, | ||
'message' => 'message', //optional | ||
'my_items' => [ | ||
[ | ||
"app_id" => 730, | ||
"context_id" => "2", | ||
"amount" => 1, | ||
"asset_id" => "28264749184" | ||
], | ||
], | ||
'partner_items' => [] | ||
]; | ||
|
||
|
||
dd($api->detailed() | ||
->withCustomCurlOpts([CURLOPT_COOKIEFILE => 'absolute_path_to_cookie_file']) // with cookie file | ||
->withCookies($cookies) // or with cookies from string or array | ||
->makeCounteredOffer(5654234726, $formData)); |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
require __DIR__ . '/../../vendor/autoload.php'; | ||
|
||
use SteamApi\SteamApi; | ||
|
||
$api = new SteamApi(); | ||
|
||
// Cookies for steamcommunity.com | ||
$cookies = 'sessionid=*********; steamCountry=****************; steamLoginSecure=**************;'; | ||
|
||
$options = [ | ||
'history' => false //optional | ||
]; | ||
|
||
|
||
dd($api->detailed() | ||
->withCustomCurlOpts([CURLOPT_COOKIEFILE => 'absolute_path_to_cookie_file']) // with cookie file | ||
->withCookies($cookies) // or with cookies from string or array | ||
->getSentOffers($options)); |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
require __DIR__ . '/../../vendor/autoload.php'; | ||
|
||
use SteamApi\SteamApi; | ||
|
||
$api = new SteamApi(); | ||
|
||
// Cookies for steamcommunity.com | ||
$cookies = 'sessionid=*********; steamCountry=****************; steamLoginSecure=**************;'; | ||
|
||
|
||
dd($api->detailed() | ||
->withCustomCurlOpts([CURLOPT_COOKIEFILE => 'absolute_path_to_cookie_file']) // with cookie file | ||
->withCookies($cookies) // or with cookies from string or array | ||
->getTradeLink()); |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
require __DIR__ . '/../../vendor/autoload.php'; | ||
|
||
use SteamApi\SteamApi; | ||
|
||
$api = new SteamApi(); | ||
|
||
// Cookies for steamcommunity.com | ||
$cookies = 'sessionid=*********; steamCountry=****************; steamLoginSecure=**************;'; | ||
|
||
|
||
dd($api->detailed() | ||
->withCustomCurlOpts([CURLOPT_COOKIEFILE => 'absolute_path_to_cookie_file']) // with cookie file | ||
->withCookies($cookies) // or with cookies from string or array | ||
->getTradeOffer(5578923742)); |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
require __DIR__ . '/../../vendor/autoload.php'; | ||
|
||
use SteamApi\SteamApi; | ||
|
||
$api = new SteamApi(); | ||
|
||
// Cookies for steamcommunity.com | ||
$cookies = 'sessionid=*********; steamCountry=****************; steamLoginSecure=**************;'; | ||
|
||
$options = [ | ||
'language' => 'english' //optional | ||
]; | ||
|
||
|
||
dd($api->detailed() | ||
->withCustomCurlOpts([CURLOPT_COOKIEFILE => 'absolute_path_to_cookie_file']) // with cookie file | ||
->withCookies($cookies) // or with cookies from string or array | ||
->getTradeReceipt(5426374527354625341, $options)); |
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
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
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace SteamApi\Configs; | ||
|
||
class TradeOffersConfig | ||
{ | ||
const STATE = [ | ||
|
||
2 => "", | ||
3 => "Trade Accepted", | ||
4 => "Counter Offer Made", | ||
|
||
6 => "Trade Offer Canceled", | ||
7 => "Trade Declined", | ||
8 => "Items Now Unavailable For Trade", | ||
9 => "Awaiting Mobile Confirmation", | ||
|
||
11 => "On hold for" | ||
]; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace SteamApi\Exception; | ||
|
||
class InvalidFormDataException extends \Exception | ||
{ | ||
|
||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace SteamApi\Exception; | ||
|
||
class InvalidTradeLinkException extends \Exception | ||
{ | ||
|
||
} |
Oops, something went wrong.