Comments (6)
also constants in Constants\SiteIds are all ints but the config expects a string.
'siteId' => Constants\SiteIds::GB,
gives me this error
Uncaught exception 'InvalidArgumentException' with message 'Invalid configuration value provided for "siteId". Expected string, but got
int 3
for now ive just casted the const to a string
'siteId' => (string)Constants\SiteIds::GB,
from ebay-sdk-php.
Cheers for spotting these. I completely missed them. Will get them fixed in the next code push.
from ebay-sdk-php.
Sorry didn't want to open another issue but
for the getcategoryfeatures, eBay recommend that you
Retrieve all available data at most once a day for each site that you work with, and store the data locally.
so ideally I would create a trading service then loop through all the siteids that i work with. Each time modifying service->config[siteId]
before making the getcategoryfeatures call.
I might have missed something but it looks like you have to create a new service if you want to use a different siteid, am i correct or can config be modified?
If not would it be possible to add some kind of setConfig($key, $val) or setSiteId method to \DTS\eBaySDK\Services\BaseService ?
from ebay-sdk-php.
possibly something like
private function setConfig($key, $val)
{
$this->config[$key] = $val;
//$resolver = new ConfigurationResolver(static::getConfigDefinitions());
//$this->config = $resolver->resolve($this->config);
}
public function setSiteId($id)
{
$this->setConfig('siteId', $id);
}
public function setGlobalId($id)
{
$this->setConfig('globalId', $id);
}
from ebay-sdk-php.
As it stands at the moment you are correct in that you would have to create a new service with the required siteId during each iteration of the loop. Off the top of my head I can't think of any technical reason as to why the SDK can't let you modify configuration options after a service has been created. I'll look into it some more, just to double check, but I think that adding some sort of setConfig
method may be the solution.
from ebay-sdk-php.
I've added a setConfig
to the beta branch so in future it will be possible to change the configuration of a service object during its lifetime.
from ebay-sdk-php.
Related Issues (20)
- Return Policy Attribute Not Valid HOT 3
- SoldItemsOnly not working HOT 1
- Element names are incorrect in file HOT 2
- "invalid_client" on oAuth when requesting user access token HOT 7
- GetFeedbackRequest always returning the same date HOT 4
- The Feed API not Working HOT 3
- findItemAdvanced not return watchCount HOT 1
- Marketing resource url incorrect for BulkCreateAdsByListingId HOT 1
- Error 11 "Please specify a File with Valid Format" HOT 2
- Notifications HOT 2
- Finance API integration HOT 1
- Unable to search category by keywords HOT 1
- HTTPS everywhere? HOT 3
- Internal error to the application:10007 on GetOrders api HOT 1
- Credentials for findItemsIneBayStoresRequest HOT 3
- AddFixedPriceItemRequest and SuperSize photos HOT 1
- Is there a flag / option / etc to log the xml response from ebay? HOT 3
- Use this: Generate and Download API SDKs for eBay HOT 3
- DTS\eBaySDK\Trading\Types\AmountType value problem HOT 9
- "Warning: "continue" targeting switch is equivalent to "break". HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ebay-sdk-php.