2017 © Pedro Peláez
 

library odata-client

Saint Systems OData Client for PHP

image

saintsystems/odata-client

Saint Systems OData Client for PHP

  • Thursday, March 15, 2018
  • by saintsystems
  • Repository
  • 5 Watchers
  • 15 Stars
  • 776 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 13 Forks
  • 9 Open issues
  • 1 Versions
  • 44 % Grown

The README.md

Get started with the OData Client for PHP

A fluent library for calling OData REST services inspired by and based on the Laravel Query Builder., (*1)

This library is currently in preview. Please continue to provide feedback as we iterate towards a production-supported library., (*2)

Build Status Latest Version on Packagist Total Downloads, (*3)

For WordPress users, please see our Gravity Forms Dynamics 365 Add-On., (*4)

Install the SDK

You can install the PHP SDK with Composer., (*5)

composer require saintsystems/odata-client

Call an OData Service

The following is an example that shows how to call an OData service., (*6)

<?php

require_once __DIR__ . '/vendor/autoload.php';

use SaintSystems\OData\ODataClient;

class UsageExample
{
    public function __construct()
    {
        $odataServiceUrl = 'https://services.odata.org/V4/TripPinService';

        $odataClient = new ODataClient($odataServiceUrl);

        // Retrieve all entities from the "People" Entity Set
        $people = $odataClient->from('People')->get();

        // Or retrieve a specific entity by the Entity ID/Key
        try {
            $person = $odataClient->from('People')->find('russellwhyte');
            echo "Hello, I am $person->FirstName ";
        } catch (Exception $e) {
            echo $e->getMessage();
        }

        // Want to only select a few properties/columns?
        $people = $odataClient->from('People')->select('FirstName','LastName')->get();
    }
}

$example = new UsageExample();

Develop

Run Tests

Run vendor/bin/phpunit from the base directory., (*7)

Documentation and resources

Issues

View or log issues on the Issues tab in the repo., (*13)

Copyright (c) Saint Systems, LLC. All Rights Reserved. Licensed under the MIT license., (*14)

The Versions

15/03 2018

dev-master

9999999-dev https://github.com/saintsystems/odata-client-php

Saint Systems OData Client for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Saint Systems

php rest odata