saintsystems / odata-client-php Goto Github PK
View Code? Open in Web Editor NEWOData Client Library for PHP
License: MIT License
OData Client Library for PHP
License: MIT License
Hi there,
I'm currently starting to consume an oData service in php.
The Service I want to consume is oData v3.
odata-client-php does not return any data for the whole service.
I testet it with an different online service and same result.
I tested https://services.odata.org/V3/OData/OData.svc/ and the results are the same.
Using: php-fpm-7.4.4-alpine
Code to reproduce:
$service_url = 'https://services.odata.org/V3/OData/OData.svc/'';
$client` = new ODataClient($service_url);
var_dump($client->from('Persons')->first());
Result:
SaintSystems\OData\Entity^ {#1178
#primaryKey: "id"
#perPage: 25
#properties: []
#original: []
#relations: []
#hidden: []
#visible: []
#appends: []
#fillable: []
#guarded: []
#dates: []
#dateFormat: null
#casts: []
#with: []
-exists: null
-entity: null
}
Any advice?
The Interface have the method "send". The method must return a HttpResponseMessage but the Class is not exists.
maybe should you use the \Psr\Http\Message\ResponseInterface?
Tell me how can I use NTLM authorization when using your library?
please update documentation link
because the link status now is 404
Hi everybody,
I need to update to Laravel 7 and I'm receiving the following errors when I try to do so:
Problem 1
- Installation request for saintsystems/odata-client ^0.3.0 -> satisfiable by saintsystems/odata-client[0.3.0].
- Conclusion: remove laravel/framework v7.5.2
- Conclusion: don't install laravel/framework v7.5.2
- saintsystems/odata-client 0.3.0 requires illuminate/support ^5.8 || ^6.0 -> satisfiable by laravel/framework[5.8.x-dev, 6.x-dev], illuminate/support[5.8.x-dev, 6.x-dev, v5.8.0, v5.8.11, v5.8.12, v5.8.14, v5.8.15, v5.8.17, v5.8.18, v5.8.19, v5.8.2, v5.8.20, v5.8.22, v5.8.24, v5.8.27, v5.8.28, v5.8.29, v5.8.3, v5.8.30, v5.8.31, v5.8.32, v5.8.33, v5.8.34, v5.8.35, v5.8.36, v5.8.4, v5.8.8, v5.8.9, v6.0.0, v6.0.1, v6.0.2, v6.0.3, v6.0.4, v6.1.0, v6.10.0, v6.11.0, v6.12.0, v6.13.0, v6.13.1, v6.14.0, v6.15.0, v6.15.1, v6.16.0, v6.17.0, v6.17.1, v6.18.0, v6.18.1, v6.18.2, v6.18.3, v6.18.4, v6.18.5, v6.18.6, v6.2.0, v6.3.0, v6.4.1, v6.5.0, v6.5.1, v6.5.2, v6.6.0, v6.6.1, v6.6.2, v6.7.0, v6.8.0].
- Can only install one of: laravel/framework[5.8.x-dev, v7.5.2].
- Can only install one of: laravel/framework[6.x-dev, v7.5.2].
- don't install illuminate/support 5.8.x-dev|don't install laravel/framework v7.5.2
- don't install illuminate/support 6.x-dev|don't install laravel/framework v7.5.2
- don't install illuminate/support v5.8.0|don't install laravel/framework v7.5.2
- don't install illuminate/support v5.8.11|don't install laravel/framework v7.5.2
- don't install illuminate/support v5.8.12|don't install laravel/framework v7.5.2
- don't install illuminate/support v5.8.14|don't install laravel/framework v7.5.2
- don't install illuminate/support v5.8.15|don't install laravel/framework v7.5.2
- don't install illuminate/support v5.8.17|don't install laravel/framework v7.5.2
- don't install illuminate/support v5.8.18|don't install laravel/framework v7.5.2
- don't install illuminate/support v5.8.19|don't install laravel/framework v7.5.2
- don't install illuminate/support v5.8.2|don't install laravel/framework v7.5.2
- don't install illuminate/support v5.8.20|don't install laravel/framework v7.5.2
- don't install illuminate/support v5.8.22|don't install laravel/framework v7.5.2
- don't install illuminate/support v5.8.24|don't install laravel/framework v7.5.2
- don't install illuminate/support v5.8.27|don't install laravel/framework v7.5.2
- don't install illuminate/support v5.8.28|don't install laravel/framework v7.5.2
- don't install illuminate/support v5.8.29|don't install laravel/framework v7.5.2
- don't install illuminate/support v5.8.3|don't install laravel/framework v7.5.2
- don't install illuminate/support v5.8.30|don't install laravel/framework v7.5.2
- don't install illuminate/support v5.8.31|don't install laravel/framework v7.5.2
- don't install illuminate/support v5.8.32|don't install laravel/framework v7.5.2
- don't install illuminate/support v5.8.33|don't install laravel/framework v7.5.2
- don't install illuminate/support v5.8.34|don't install laravel/framework v7.5.2
- don't install illuminate/support v5.8.35|don't install laravel/framework v7.5.2
- don't install illuminate/support v5.8.36|don't install laravel/framework v7.5.2
- don't install illuminate/support v5.8.4|don't install laravel/framework v7.5.2
- don't install illuminate/support v5.8.8|don't install laravel/framework v7.5.2
- don't install illuminate/support v5.8.9|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.0.0|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.0.1|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.0.2|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.0.3|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.0.4|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.1.0|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.10.0|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.11.0|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.12.0|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.13.0|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.13.1|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.14.0|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.15.0|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.15.1|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.16.0|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.17.0|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.17.1|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.18.0|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.18.1|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.18.2|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.18.3|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.18.4|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.18.5|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.18.6|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.2.0|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.3.0|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.4.1|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.5.0|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.5.1|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.5.2|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.6.0|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.6.1|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.6.2|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.7.0|don't install laravel/framework v7.5.2
- don't install illuminate/support v6.8.0|don't install laravel/framework v7.5.2
- Installation request for laravel/framework (locked at v7.5.2, required as ^7.0) -> satisfiable by laravel/framework[v7.5.2].
I hope to get your answer because now I have to develop some odata integrations and I'm at a rubicon point!
In Builder.php there are references to "order" but it seems the "order" method hasn't been implemented yet.
In this method there are a few mistakes.
$ref = false, $count = false
ExpandClause
does not exist or there is a missing package? - fixed in dfb3ed3#diff-bc4e6493f8d57ecd9362965a01af9bbcL7$this->expands
is not defined - fixed in dfb3ed3#diff-e1377d46375e2197b5102fa2a9a492c8R156$where
is undefinedCan you publish version 0.2.5 on packagist.org?
thank you
When trying to add an array of where filters (which I had working in a previous version) I get an extra = at the beginning of the items in the filter. Here is the generated url:
https://api.channeladvisor.com/v1/Products?$select=Sku,ID&$filter=(=Sku%20eq%20'MCN-GATRTDB-20X3-PINK'%20or%20Sku%20eq%20'MCN-RDJASBD12OZ-12OZ'%20or%20Sku%20eq%20'MCN-GAAUAS-34OZ-CLR-2'%20or%20Sku%20eq%20'MCN-IMFRKSDWR-3PC-10X6-BLCK-2'%20or%20Sku%20eq%20'HGR-SSACSBC-SML-BLCK-2'%20or%20Sku%20eq%20'MCN-MGAA8OZWGRA-8OZ-CLR'%20or%20Sku%20eq%20'HGR-SSACSBC-SML-BLCK-HPN'%20or%20Sku%20eq%20'UPD-JOJOFLEECETHROW-PNK-HPNR'%20or%20Sku%20eq%20'MCN-MAURAWGR-34OZ-CLR'%20or%20Sku%20eq%20'HGR-SSACSBC-SML-BLCK'%20or%20Sku%20eq%20'UPD-JOJOFLEECETHROW-PNK-HPNR'%20or%20Sku%20eq%20'MCN-MAURAWGR-34OZ-CLR'%20or%20Sku%20eq%20'UPD-JOJOFLEECETHROW-PNK-HPNR'%20or%20Sku%20eq%20'HGR-SSACSBC-SML-BLCK-HPN'%20or%20Sku%20eq%20'MCN-GATTMRPBAC-6PC-BLK-HVAR-AMZN')
As you can see, after the opening parenthesis there is an extra =
in this part &$filter=(=Sku%20eq
When using the where function on for example a integer-field, you'll get the following error because quotes are automatically set around the value:
A binary operator with incompatible types was detected. Found operand types 'Edm.Int32' and 'Edm.String' for operator kind 'Equal'.
Is there an option to prevent those quotes from being added for specific fields?
What is the proper syntax here?
I can get it to work by doing
$client->get("Entity(prop1=1,prop2=2)");
Is there some better way?
odata-client-php/src/Query/Builder.php
Line 967 in 454baac
There is no "compileMethod" method in the interface, as in the class "Grammar".
First of all, thanks for your effort on this open-source project.
Secondly, I have zero experience with OData, I'm trying to fetch data from a third-party API, but I get different results when trying to query it with this library and when I enter the URL directly in the browser.
Example:
Base URL: https://api.foo.com/odata
Entity: $odataClient->from('Providers')->get();
Authentication Callback:
const TOKEN = '123456';
function(HttpRequestMessage $request) {
$request->requestUri = $request->requestUri . '?token=' . self::TOKEN;
return $request;
}
Final request URL: https://api.foo.com/odata/Providers?token=123456
Visiting this URL on the browser returns the expected results, while in code, the OData library returns a 404 - The resource cannot be found.
Uncaught GuzzleHttp\Exception\ClientException: Client error: `GET https://api.foo.com/odata/Providers?token=123456` resulted in a `404 Not Found` response:
<!DOCTYPE html>
<html>
<head>
<title>The resource cannot be found.</title>
<meta name="viewport" (truncated...)
in /application/www/wp/foo/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113
Stack trace:
#0 /application/www/wp/foo/vendor/guzzlehttp/guzzle/src/Middleware.php(66): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response))
#1 /application/www/wp/foo/vendor/guzzlehttp/promises/src/Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response))
#2 /application/www/wp/foo/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array)
#3 /application/www/wp/foo/vendor/guzzlehttp/promises/src/TaskQueue.php(47): Guz
Am I missing something?
Thank you.
Hi,
Is it possible to add a parameter to all the requests? I should add $format=json
to every call the odataClient is creating. Thanks in advance!
Thank you for creating this project, its very good!
I think that it will be really nice to refactor code which will do all package functionality with psr http standards.
I found a list of ideas that for my opinion can make it more usable and allow to use package easy in pure php project:
Create code which will manipulate only Psr\Http interfaces, also create possibility to configure it with ContainerInterface(psr 11).
For example in ODataClient has dependencies from uri and auth provider, but its wrong, because its a request dependencies.
Its only ideas but I think it will be really good for using it in pure php projects or projects which will not have Laravel dependencies.
This is another error I got:
Call to undefined method SaintSystems\OData\Entity::getMutatedProperties()" at Entity.php line 1194.
Composer Error resolving dependencies.
Laravel 8 requires Guzzle 7.0.1 or later. This project is utilizing guzzle 6.3 and is not compatible with guzzle 7.0.1 as defined in composer file.
Problem 1
- Can only install one of: guzzlehttp/guzzle[6.5.x-dev, 7.1.0].
- Can only install one of: guzzlehttp/guzzle[7.1.0, 6.5.x-dev].
- Can only install one of: guzzlehttp/guzzle[6.5.x-dev, 7.1.0].
- saintsystems/odata-client 0.5.2 requires guzzlehttp/guzzle ^6.3 -> satisfiable by guzzlehttp/guzzle[6.5.x-dev].
- Installation request for saintsystems/odata-client ^0.5.2 -> satisfiable by saintsystems/odata-client[0.5.2].
- Installation request for guzzlehttp/guzzle (locked at 7.1.0, required as ^7.0.1) -> satisfiable by guzzlehttp/guzzle[7.1.0].
Installation failed, reverting ./composer.json to its original content.```
Some systems like Microsoft Dynamics return XML by default and only return JSON upon request. Regarding the fact that this implementation only accepts JSON as valid format it should tell the remote end by Default.
In: \SaintSystems\OData\ODataRequest::getDefaultHeaders
Add: RequestHeader::ACCEPT => 'application/json',
Keep up the good work, awesome implementation.
How to Post PUT PATCH? Can you give me an example?
When using post() to fire a $batch based request containing one or more change sets, the response is returned as a HTTP 200 status.
However if one or more of the change sets have failed and have, for example, a 500 status with a JSON error returned, these messages are not parsed.
$test = $oDataClient->post('$batch', $body);
Is there a returnType to give to getResponseAsObject() to pull the change set responses into something to iterate over and check?
The official site says that your library supports versions V1-4, but only version 4 works for me.
https://www.odata.org/libraries/
Is there support for at least the third version?
There is a way to launch native query or filtler ?
example : https://example.com/odata/v2/User?$filter=userId eq 311 &$fromDate=2019-01-01&toDate=2019-12-01
How do we use the lambda operators "any" / "all"??
Here is the odata documentation for the lambda operators
Thank you!
I'm running into an issue for Call to undefined method SaintSystems\OData\Entity::getRelationValue()
in line 1344 of the Entity
class.
As of OData 4.01, the in statement is supported.
Here is the example from their documentation:
Example 56: all products whose name value is ‘Milk’ or ‘Cheese’:
http://host/service/Products?$filter=Name in ('Milk', 'Cheese')
Is there a functionality for this in this library? Thank you
I haven't tried the library yet, are post and update request implemented?
When specifying a where query a string will not have quotes if the string only contains numbers.
Code:
$builder->from('Files')->select('Title', 'ID')->where('Cvrnr_Value', '1');
In my case the field Cvrnr_Value
is a String type, therefore 1 should not be converted to an Int32
Expected output from $builder->toRequest():
"Files?$select=Title,FileNo,ID&$filter=Cvrnr_Value eq '1'"
Actual output:
"Files?$select=Title,FileNo,ID&$filter=Cvrnr_Value eq 1"
Error from Odata:
A binary operator with incompatible types was detected. Found operand types 'Edm.String' and 'Edm.Int32' for operator kind 'Equal'.
I think this is related the fix from #20 , which likely introduced this bug
Is there a way you can force the string to have quotes?
$key = static::$primaryKey;
$primaryKey
is undefined at line 1333 of the Entity
class
Access to undeclared static property: SaintSystems\OData\Entity::$primaryKey
Hi,
when i call
$client->get('ENTITY(\'123456\')');
the url generated is
https://example/odata/ENTITY('123456')
and I get the result
but when I try
$client->from('ENTITY')->find('123456');
the url generated is
https://example/odata/ENTITY(123456)
and I no results
Hi,
I am not sure if this is an intended purpose of the library but I would like it to have support for primitive data types from previous OData versions (ex: Edm.Binary, Edm.DateTime, Edm.Guid, etc) from here: https://www.odata.org/documentation/odata-version-2-0/overview/
The problem with those are that they have similar syntax to enums but not quite so they get wrapped in single quotations marks.
A basic solution would be to have another regex to capture these specific cases in the whereBasic function of Grammar class.
If the library is supposed to only support OData v4 then I guess I will have to always keep a fork of it for this extension otherwise I could do a PR.
Hello,
Would love to use the package but the dependencies are a bit of a problem.
So I am wondering any plans to change the actual implementations of guzzle / monolog etc to the PSR interfaces?
Kind regards,
Freek
Cloning the repo and running composer install hangs. Adding -vvv shows "Something's changed, looking at all rules again" where a counter just increases and never stops - removing phpdocumentor seems to fix this.
Has anyone else found this and if so is there a way round it without removing the package ?
For example we have request like this
$people = $odataClient->from('People')->take(2)->get();
How I can get access to @odata.nextLink
How can I pass them? Could you show an example please?
IAuthenticationProvider is never used, but it would be helpfull. Instead of Closure (in constructor's second argument) should be Callable object (then possible would be pass an object with __invoke method declared) or declared already IAuthenticationProvider interface.
Thank you for the great library, I am not really familiar with the codes but I tried
$Properties = $odataClient->from('Property')->where([
['ListingKeyNumeric','=','1005476'],
['NewConstructionYN','=','1']
])->get();
and it through the following error
{"error":{"code":400,"message":"Incompatible types."}}
The json looks like this:
object(Illuminate\ Support\ Collection) #1322 (1) { ["items":protected]= > array(2) { [0] => object(SaintSystems\ OData\ Entity) #1338 (16) { ["primaryKey":protected]= > string(2) "id" ["perPage": protected] => int(25)["properties": protected] => array(238) { ["ListingKeyNumeric"] => int(1005476)["AssociationFee"] => int(0)["RoomsTotal"] => int(0)["Stories"] => int(0)["BathroomsFull"] => int(0)["BathroomsHalf"] => int(0)["BathroomsThreeQuarter"] => int(0)["BathroomsPartial"] => int(0)["BathroomsTotalInteger"] => int(0)["BedroomsTotal"] => int(0)["CarportSpaces"] => int(0)["CoveredSpaces"] => int(0)["CoListAgentKeyNumeric"] => int(0)["CoListOfficeKeyNumeric"] => int(0)["CumulativeDaysOnMarket"] => int(183)["DaysOnMarket"] => int(183)["FireplacesTotal"] => int(0)["GarageSpaces"] => int(0)["ListAgentKeyNumeric"] => int(37053)["ListOfficeKeyNumeric"] => int(69693)["ListPrice"] => float(159000)["LeaseAmount"] => int(0)["LivingArea"] => int(0)["BuildingAreaTotal"] => int(0)["LotSizeAcres"] => float(0.37)["LotSizeSquareFeet"] => float(16117.2)["NumberOfBuildings"] => int(0)["NumberOfUnitsLeased"] => int(0)["NumberOfUnitsTotal"] => int(0)["LotSizeArea"] => float(0.37)["MainLevelBedrooms"] => int(0)["OriginalListPrice"] => float(159000)["ParkingTotal"] => int(0)["OpenParkingSpaces"] => int(0)["PhotosCount"] => int(0)["StreetNumberNumeric"] => int(1022)["TaxAnnualAmount"] => float(1)["YearBuilt"] => int(0)["YearBuiltEffective"] => int(0)["MobileLength"] => int(0)["MobileWidth"] => int(0)["BathroomsOneQuarter"] => int(0)["CapRate"] => int(0)["NumberOfPads"] => int(0)["StoriesTotal"] => int(0)["YearEstablished"] => int(0)["CoListAgentFirstName"] => NULL["CoListAgentFullName"] => string(0) "" ["CoListAgentKey"] => NULL["CoListAgentLastName"] => NULL["CoListAgentMiddleName"] => NULL["CoListAgentMlsId"] => NULL["CoListAgentStateLicense"] => NULL["CoListOfficeKey"] => NULL["CoListOfficeMlsId"] => NULL["CoListOfficeName"] => NULL["CopyrightNotice"] => string(57) "Copyright © UtahRealEstate.com. All Rights Reserved." ["CrossStreet"] => string(4) "1200" ["Exclusions"] => NULL["FrontageLength"] => string(4) "95.0" ["Inclusions"] => NULL["ListAgentFirstName"] => string(4) "Kaye" ["ListAgentFullName"] => string(16) "Kaye Christensen" ["ListAgentKey"] => string(5) "37053" ["ListAgentLastName"] => string(11) "Christensen" ["ListAgentMiddleName"] => string(0) "" ["ListAgentMlsId"] => string(5) "37053" ["ListOfficeKey"] => string(5) "69693" ["ListOfficeMlsId"] => string(5) "69693" ["ListOfficeName"] => string(15) "Showcase Realty" ["ListingId"] => string(7) "1005476" ["ListingKey"] => string(7) "1005476" ["OriginatingSystemID"] => string(9) "M00000628" ["OriginatingSystemKey"] => string(9) "M00000628" ["OriginatingSystemName"] => string(18) "UtahRealEstate.com" ["OtherParking"] => NULL["ParcelNumber"] => string(11) "11-046-0557" ["PostalCode"] => string(5) "84037" ["PublicRemarks"] => string(236) "Rare Find! Large,flat lot in desirable,established,East Kaysville neighborhood! HUGE 6+car garage/workshop already on property! Previous sale for over $200,000 fell through. Motivated owner taking a loss. Will finance with accept.terms." ["RVParkingDimensions"] => NULL["SourceSystemID"] => string(9) "M00000628" ["SourceSystemKey"] => string(9) "M00000628" ["SourceSystemName"] => string(18) "UtahRealEstate.com" ["StreetName"] => string(6) "OXFORD" ["StreetNumber"] => string(4) "1022" ["SubdivisionName"] => string(18) "KING CLARION HILLS" ["UnitNumber"] => string(3) "503" ["UnparsedAddress"] => string(16) "1022 E OXFORD DR" ["VirtualTourURLUnbranded"] => NULL["Zoning"] => string(13) "Single-Family" ["ZoningDescription"] => string(3) "RES" ["LotSizeDimensions"] => string(12) "95.0x0.0x0.0" ["Topography"] => string(13) "Terrain: Flat" ["BuilderName"] => NULL["DOH1"] => NULL["DOH2"] => NULL["DOH3"] => NULL["License1"] => NULL["License2"] => NULL["License3"] => NULL["Make"] => NULL["Model"] => NULL["ParkName"] => NULL["PostalCodePlus4"] => NULL["SerialU"] => NULL["SerialX"] => NULL["SerialXX"] => NULL["StreetAdditionalInfo"] => NULL["StreetSuffixModifier"] => NULL["WaterBodyName"] => NULL["AssociationYN"] => bool(false)["AttachedGarageYN"] => bool(false)["CarportYN"] => bool(false)["CoolingYN"] => bool(false)["FireplaceYN"] => bool(false)["GarageYN"] => bool(false)["HeatingYN"] => bool(false)["HorseYN"] => bool(true)["InternetAddressDisplayYN"] => bool(true)["SearchableYN"] => bool(true)["InternetEntireListingDisplayYN"] => bool(true)["OpenParkingYN"] => bool(false)["PoolPrivateYN"] => bool(false)["SeniorCommunityYN"] => bool(false)["SpaYN"] => bool(false)["ViewYN"] => bool(true)["NewConstructionYN"] => bool(false)["InternetAutomatedValuationDisplayYN"] => bool(false)["InternetConsumerCommentYN"] => bool(false)["LeaseConsideredYN"] => bool(false)["PropertyAttachedYN"] => bool(false)["WaterfrontYN"] => bool(false)["ContingentDate"] => NULL["ContractStatusChangeDate"] => string(10) "2011-06-24" ["ListingContractDate"] => string(10) "2010-12-23" ["OnMarketDate"] => string(10) "2010-12-23" ["PurchaseContractDate"] => string(10) "2011-06-20" ["ModificationTimestamp"] => string(20) "2020-12-02T16:43:03Z" ["OriginalEntryTimestamp"] => string(20) "2010-12-23T18:30:05Z" ["PhotosChangeTimestamp"] => NULL["PriceChangeTimestamp"] => NULL["StatusChangeTimestamp"] => NULL["AssociationFeeFrequency"] => string(0) "" ["City"] => string(9) "Kaysville" ["Country"] => string(2) "US" ["CountyOrParish"] => string(5) "Davis" ["DirectionFaces"] => string(5) "North" ["ElementarySchool"] => string(6) "Morgan" ["ElementarySchoolDistrict"] => string(5) "Davis" ["HighSchool"] => string(5) "Davis" ["HighSchoolDistrict"] => string(5) "Davis" ["ListingService"] => string(0) "" ["LivingAreaUnits"] => string(0) "" ["LotSizeUnits"] => string(0) "" ["MLSAreaMajor"] => string(32) "Kaysville; Fruit Heights; Layton" ["MiddleOrJuniorSchool"] => string(9) "Fairfield" ["MiddleOrJuniorSchoolDistrict"] => string(5) "Davis" ["MlsStatus"] => string(14) "Under Contract" ["PostalCity"] => string(9) "Kaysville" ["PropertySubType"] => string(11) "Residential" ["PropertyType"] => string(4) "Land" ["StandardStatus"] => string(7) "Pending" ["StateOrProvince"] => string(2) "UT" ["StreetDirPrefix"] => string(1) "E" ["StreetDirSuffix"] => string(1) "N" ["StreetSuffix"] => string(2) "DR" ["LivingAreaSource"] => string(0) "" ["YearBuiltSource"] => string(0) "" ["AccessibilityFeatures"] => string(0) "" ["Appliances"] => string(0) "" ["ArchitecturalStyle"] => string(0) "" ["AssociationAmenities"] => string(0) "" ["AssociationFeeIncludes"] => string(0) "" ["Basement"] => string(0) "" ["ConstructionMaterials"] => string(0) "" ["Cooling"] => string(0) "" ["DoorFeatures"] => string(0) "" ["ExteriorFeatures"] => string(25) "See Remarks,Out Buildings" ["Flooring"] => string(0) "" ["GreenBuildingVerificationType"] => string(0) "" ["Heating"] => string(0) "" ["InteriorFeatures"] => string(0) "" ["LaundryFeatures"] => string(0) "" ["ListingTerms"] => string(91) "See Remarks,Cash,Conventional,Lease Option,Owner 2nd,Seller Finance,Seller Will Subordinate" ["LotFeatures"] => string(74) "Curb & Gutter,Fenced: Part,Secluded,Sidewalks,View: Mountain,Terrain: Flat" ["OtherEquipment"] => string(0) "" ["ParkingFeatures"] => string(0) "" ["PatioAndPorchFeatures"] => string(0) "" ["PoolFeatures"] => string(0) "" ["PropertyCondition"] => string(13) "Blt./Standing" ["Roof"] => string(0) "" ["Sewer"] => string(0) "" ["Utilities"] => string(54) "See Remarks,Gas: Stubbed,Power: Stubbed,Sewer: Stubbed" ["Vegetation"] => string(0) "" ["View"] => string(0) "" ["WaterSource"] => string(0) "" ["WindowFeatures"] => string(0) "" ["CurrentUse"] => string(11) "Residential" ["Fencing"] => string(0) "" ["FireplaceFeatures"] => string(0) "" ["GreenEnergyGeneration"] => string(0) "" ["BodyType"] => string(0) "" ["BuildingFeatures"] => string(0) "" ["BusinessType"] => string(0) "" ["CommonWalls"] => string(0) "" ["CommunityFeatures"] => string(0) "" ["Electric"] => string(0) "" ["FoundationDetails"] => string(0) "" ["GreenEnergyEfficient"] => string(0) "" ["GreenIndoorAirQuality"] => string(0) "" ["GreenLocation"] => string(0) "" ["GreenSustainability"] => string(0) "" ["GreenWaterConservation"] => string(0) "" ["Levels"] => string(0) "" ["OtherStructures"] => string(0) "" ["PossibleUse"] => string(0) "" ["RentIncludes"] => string(0) "" ["RoadFrontageType"] => string(0) "" ["RoadSurfaceType"] => string(0) "" ["RoomType"] => string(0) "" ["Skirt"] => string(0) "" ["SpaFeatures"] => string(0) "" ["SpecialListingConditions"] => string(0) "" ["StructureType"] => string(0) "" ["UnitTypeType"] => string(0) "" ["WaterfrontFeatures"] => string(0) "" ["GeoLocation"] => NULL["BasementFinished"] => int(0)["ConstStatus"] => NULL["PowerProductionSolarYearInstall"] => int(0)["SolarFinanceCompany"] => NULL["SolarLeasingCompany"] => NULL["SolarOwnership"] => NULL["PowerProductionType"] => string(0) "" ["LevelData"] => string(1059) "levb_bathfull:0,levb_bathhalf:0,levb_bathtq:0,levb_bed:0,levb_den:0,levb_dining_f:0,levb_dining_s:0,levb_famroom:0,levb_fireplace:0,levb_formalliving:0,levb_kitchen_b:0,levb_kitchen_k:0,levb_laundry:0,levb_sqf:0,lev1_bathfull:0,lev1_bathhalf:0,lev1_bathtq:0,lev1_bed:0,lev1_den:0,lev1_dining_f:0,lev1_dining_s:0,lev1_famroom:0,lev1_fireplace:0,lev1_formalliving:0,lev1_kitchen_b:0,lev1_kitchen_k:0,lev1_laundry:0,lev1_sqf:0,lev2_bathfull:0,lev2_bathhalf:0,lev2_bathtq:0,lev2_bed:0,lev2_den:0,lev2_dining_f:0,lev2_dining_s:0,lev2_famroom:0,lev2_fireplace:0,lev2_formalliving:0,lev2_kitchen_b:0,lev2_kitchen_k:0,lev2_laundry:0,lev2_sqf:0,lev3_bathfull:0,lev3_bathhalf:0,lev3_bathtq:0,lev3_bed:0,lev3_den:0,lev3_dining_f:0,lev3_dining_s:0,lev3_famroom:0,lev3_fireplace:0,lev3_formalliving:0,lev3_kitchen_b:0,lev3_kitchen_k:0,lev3_laundry:0,lev3_sqf:0,lev4_bathfull:0,lev4_bathhalf:0,lev4_bathtq:0,lev4_bed:0,lev4_den:0,lev4_dining_f:0,lev4_dining_s:0,lev4_famroom:0,lev4_fireplace:0,lev4_formalliving:0,lev4_kitchen_b:0,lev4_kitchen_k:0,lev4_laundry:0,lev4_sqf:0" ["AboveGradeFinishedArea"] => int(0)["MasterBedroomLevel"] => string(0) "" ["IrrigationWaterRightsAcres"] => int(0) }["original": protected] => array(0) {}["relations": protected] => array(0) {}["hidden": protected] => array(0) {}["visible": protected] => array(0) {}["appends": protected] => array(0) {}["fillable": protected] => array(0) {}["guarded": protected] => array(0) {}["dates": protected] => array(0) {}["dateFormat": protected] => NULL["casts": protected] => array(0) {}["with": protected] => array(0) {}["exists": "SaintSystems\OData\Entity": private] => NULL["entity": "SaintSystems\OData\Entity": private] => NULL } } }
How do you insert the token parameter in the URL?
example: https:\\api.site.com\tickets?token=e54fefe6f6ef4e64fe6ff6f4e4fe
Hello,
When i tried to get a specific item from a collection by ID .
` $odataServiceUrl = 'https://services.odata.org/V4/TripPinService';
$odataClient = new ODataClient($odataServiceUrl);
$person = $odataClient->from('People')->find('russellwhyte');
echo "Hello, I am $person->FirstName ";`
the system returned :
The website encountered an unexpected error. Please try again later.
InvalidArgumentException: Method must be a non-empty string. in GuzzleHttp\Psr7\Request->assertMethod() (line 148 of /vendor/guzzlehttp/psr7/src/Request.php).
Thanks
Said
When I run composer command it fail because of carbon package. It's it possible to edit the version of carbon so it will work in the newest version of laravel?
require saintsystems/odata-client
Using version ^0.2.4 for saintsystems/odata-client
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for saintsystems/odata-client ^0.2.4 -> satisfiable by saintsystems/odata-client[0.2.4].
- Conclusion: remove nesbot/carbon 2.20.0
- Conclusion: don't install nesbot/carbon 2.20.0
- saintsystems/odata-client 0.2.4 requires nesbot/carbon ^1.22 -> satisfiable by nesbot/carbon[1.22.0, 1.22.1, 1.23.0, 1.24.0, 1.24.1, 1.24.2, 1.25.0, 1.25.1, 1.25.3, 1.26.0, 1.26.1, 1.26.2, 1.26.3, 1.26.4, 1.26.5, 1.26.6, 1.27.0, 1.28.0, 1.29.0, 1.29.1, 1.29.2, 1.30.0, 1.31.0, 1.31.1, 1.32.0, 1.33.0, 1.34.0, 1.34.1, 1.34.2, 1.34.3, 1.34.4, 1.35.0, 1.35.1, 1.36.0, 1.36.1, 1.36.2, 1.37.0, 1.37.1, 1.38.0, 1.38.1, 1.38.2, 1.38.3, 1.38.4, 1.39.0].
- Can only install one of: nesbot/carbon[1.26.3, 2.20.0].
- Can only install one of: nesbot/carbon[1.26.4, 2.20.0].
- Can only install one of: nesbot/carbon[1.26.5, 2.20.0].
- Can only install one of: nesbot/carbon[1.26.6, 2.20.0].
- Can only install one of: nesbot/carbon[1.27.0, 2.20.0].
- Can only install one of: nesbot/carbon[1.28.0, 2.20.0].
- Can only install one of: nesbot/carbon[1.29.0, 2.20.0].
- Can only install one of: nesbot/carbon[1.29.1, 2.20.0].
- Can only install one of: nesbot/carbon[1.29.2, 2.20.0].
- Can only install one of: nesbot/carbon[1.30.0, 2.20.0].
- Can only install one of: nesbot/carbon[1.31.0, 2.20.0].
- Can only install one of: nesbot/carbon[1.31.1, 2.20.0].
- Can only install one of: nesbot/carbon[1.32.0, 2.20.0].
- Can only install one of: nesbot/carbon[1.33.0, 2.20.0].
- Can only install one of: nesbot/carbon[1.34.0, 2.20.0].
- Can only install one of: nesbot/carbon[1.34.1, 2.20.0].
- Can only install one of: nesbot/carbon[1.34.2, 2.20.0].
- Can only install one of: nesbot/carbon[1.34.3, 2.20.0].
- Can only install one of: nesbot/carbon[1.34.4, 2.20.0].
- Can only install one of: nesbot/carbon[1.35.0, 2.20.0].
- Can only install one of: nesbot/carbon[1.35.1, 2.20.0].
- Can only install one of: nesbot/carbon[1.36.0, 2.20.0].
- Can only install one of: nesbot/carbon[1.36.1, 2.20.0].
- Can only install one of: nesbot/carbon[1.36.2, 2.20.0].
- Can only install one of: nesbot/carbon[1.37.0, 2.20.0].
- Can only install one of: nesbot/carbon[1.37.1, 2.20.0].
- Can only install one of: nesbot/carbon[1.38.0, 2.20.0].
- Can only install one of: nesbot/carbon[1.38.1, 2.20.0].
- Can only install one of: nesbot/carbon[1.38.2, 2.20.0].
- Can only install one of: nesbot/carbon[1.38.3, 2.20.0].
- Can only install one of: nesbot/carbon[1.38.4, 2.20.0].
- Can only install one of: nesbot/carbon[1.39.0, 2.20.0].
- Can only install one of: nesbot/carbon[1.22.0, 2.20.0].
- Can only install one of: nesbot/carbon[1.22.1, 2.20.0].
- Can only install one of: nesbot/carbon[1.23.0, 2.20.0].
- Can only install one of: nesbot/carbon[1.24.0, 2.20.0].
- Can only install one of: nesbot/carbon[1.24.1, 2.20.0].
- Can only install one of: nesbot/carbon[1.24.2, 2.20.0].
- Can only install one of: nesbot/carbon[1.25.0, 2.20.0].
- Can only install one of: nesbot/carbon[1.25.1, 2.20.0].
- Can only install one of: nesbot/carbon[1.25.3, 2.20.0].
- Can only install one of: nesbot/carbon[1.26.0, 2.20.0].
- Can only install one of: nesbot/carbon[1.26.1, 2.20.0].
- Can only install one of: nesbot/carbon[1.26.2, 2.20.0].
- Installation request for nesbot/carbon (locked at 2.20.0) -> satisfiable by nesbot/carbon[2.20.0].
PR OData/odataorg.github.io#192
Destination https://www.odata.org/libraries/
How do I run this kind of relation query with this client?
https://abc.com/odata/Books(123)/Readers
Thanks
SaintSystems\OData\ODataResponse
assumes a json response, any plans for support?
How to make the multiple where conditions?
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package saintsystems/odata-client could not be found in any version, there may be a typo in the package name.
Potential causes:
This is the error I got:
Call to undefined method SaintSystems\OData\Query\Builder::whereNull()" at Query/Builder.php line 365.
In line
odata-client-php/src/Option.php
Line 7 in 8361f3f
public function __construct(string $name, string $value)
This is a PHP7 feature. so increase the php version in composer.json or remove the hint here...
I can get to the entities no problem but what I am unable to figure out is to access properties from a created entity set. The Odata provider is sharefile. For example, my selects for this are not working:
$yada->select('Id,Name,CreatorNameShort,Info,Info/IsAHomeFolder,Children/Id,Children/Name,Children/CreationDate,Children/FileSizeBytes,Children/CreatorNameShort,Children/FileCount');
This has a root folder structure followed by the child folders. This would be root where users see folders, etc..
Access to a folder directly is same minus a has specified for the specific item.
What I am trying to achieve, if it is possible with this, is to create an entity collection like..
$my_collection
I create.
then
$my_collection2->from($my_collection)
etc
I am unable to retrieve the properties as if I was using direct php property_exists...
Is this supported?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.