{"id":36979697,"url":"https://github.com/cronixweb/streamline-sdk","last_synced_at":"2026-01-13T22:49:19.072Z","repository":{"id":320338069,"uuid":"1063924999","full_name":"cronixweb/streamline-sdk","owner":"cronixweb","description":null,"archived":false,"fork":false,"pushed_at":"2025-10-30T10:29:56.000Z","size":95,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-30T12:08:57.117Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cronixweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-25T09:53:07.000Z","updated_at":"2025-10-30T10:45:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"5f7fc5b0-8fd6-4202-9bf6-441855791ed6","html_url":"https://github.com/cronixweb/streamline-sdk","commit_stats":null,"previous_names":["cronixweb/php-streamlinesdk"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/cronixweb/streamline-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cronixweb%2Fstreamline-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cronixweb%2Fstreamline-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cronixweb%2Fstreamline-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cronixweb%2Fstreamline-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cronixweb","download_url":"https://codeload.github.com/cronixweb/streamline-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cronixweb%2Fstreamline-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28403745,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-13T22:49:18.341Z","updated_at":"2026-01-13T22:49:19.065Z","avatar_url":"https://github.com/cronixweb.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://cronixweb.com\" target=\"_blank\" rel=\"noreferrer\"\u003e\n    \u003cimg src=\"https://cronixweb.com/wp-content/uploads/2024/04/Logo-1.svg\" alt=\"Cronix LLC\" height=\"72\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.streamlinevrs.com\" target=\"_blank\" rel=\"noreferrer\"\u003e\n    \u003cstrong\u003eStreamline VRS\u003c/strong\u003e\u003cbr/\u003e\n    \u003csub\u003eVacation Rental Software · All-in-one property management platform for professional managers\u003c/sub\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eStreamline VRS PHP SDK\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  Laravel-ready, typed PHP SDK for the \u003ca href=\"https://www.streamlinevrs.com\" target=\"_blank\" rel=\"noreferrer\"\u003eStreamline Vacation Rental Software (VRS)\u003c/a\u003e JSON API,\u003cbr\u003e\n  engineered by \u003ca href=\"https://cronixweb.com\" target=\"_blank\" rel=\"noreferrer\"\u003eCronix LLC\u003c/a\u003e, a full-service eCommerce \u0026amp; digital agency.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://packagist.org/packages/cronixweb/streamline-sdk\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Packagist-cronixweb%2Fstreamline--sdk-informational\" alt=\"Packagist\"\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/PHP-8.2%2B-777bb4\" alt=\"PHP 8.2+\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Laravel-HTTP%20Client%20Ready-orange\" alt=\"Laravel HTTP\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Status-Actively%20Evolving-success\" alt=\"Status: Actively evolving\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/License-MIT-lightgrey\" alt=\"MIT License\"\u003e\n\u003c/p\u003e\n\n---\n\n\u003e Need help integrating \u003ca href=\"https://www.streamlinevrs.com\" target=\"_blank\" rel=\"noreferrer\"\u003eStreamline VRS\u003c/a\u003e into your Laravel or eCommerce stack?\u003cbr\u003e\n\u003e Cronix LLC can architect, build, and maintain your integration from end-to-end.\u003cbr\u003e\n\u003e 👉 \u003cstrong\u003e\u003ca href=\"https://cronixweb.com/contact-us\" target=\"_blank\" rel=\"noreferrer\"\u003eTalk to an expert\u003c/a\u003e\u003c/strong\u003e or email \u003cstrong\u003esales@cronixweb.com\u003c/strong\u003e.\n\n---\n\n## Table of Contents\n\n- [Overview](#overview)\n- [Features](#features)\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [Quick Start](#quick-start)\n- [Usage](#usage)\n  - [Properties](#properties)\n  - [Amenities](#amenities)\n  - [Gallery Images](#gallery-images)\n  - [Reviews](#reviews)\n  - [Booked / Blocked Days](#booked--blocked-days)\n  - [Property Rates](#property-rates)\n  - [Token Renewal](#token-renewal)\n- [Error Handling](#error-handling)\n- [Date Formats \u0026amp; Common Parameters](#date-formats--common-parameters)\n- [FAQ \u0026amp; Notes](#faq--notes)\n- [Cronix LLC · Services \u0026amp; Support](#cronix-llc--services--support)\n- [Contributing](#contributing)\n- [License](#license)\n- [Resources \u0026amp; Bibliography](#resources--bibliography)\n\n---\n\n## Overview\n\n**Streamline VRS PHP SDK** is a thin, Laravel-friendly wrapper around the  \n[Streamline VRS JSON API](https://web.streamlinevrs.com/api/json).\n\nIt focuses on:\n\n- Handling authentication and token renewal\n- Building and sending requests via Laravel’s HTTP client\n- Parsing common response structures into small, predictable models\n- Providing ergonomic, typed clients for the Streamline endpoints you use most\n\nNamespaces follow:\n\n```php\nCronixweb\\Streamline\\...\n```\n\nFor example:\n\n```php\nuse Cronixweb\\Streamline\\Streamline;\n```\n\n\u003e **Note:** This package is not officially affiliated with Streamline VRS.  \n\u003e It is maintained by **[Cronix LLC](https://cronixweb.com)**, an eCommerce and digital agency that frequently works with travel, hospitality, and property platforms.\n\n---\n\n## Features\n\n- 🔐 **Simple Streamline authentication entry point**  \n  Single `Streamline::api($key, $secret)` to bootstrap all clients against the Streamline VRS API.\n\n- 🔗 **Convenient, typed clients for common resources**\n  - Properties: `GetPropertyList`, `GetPropertyInfo`\n  - Amenities: `GetPropertyAmenities`\n  - Media: `GetPropertyGalleryImages`\n  - Reviews: `GetGuestReviews`\n  - Availability: `GetBlockedDaysForUnit`\n  - Rates: `GetPropertyRates`\n  - Auth: `RenewExpiredToken`\n\n- 🧩 **Lightweight model parsing**\n  - Normalizes typical response structures into model-like arrays/objects.\n  - Handles “single item vs list” response quirks defensively.\n\n- 🧰 **Laravel-native tooling**\n  - Uses `Illuminate\\Support\\Facades\\Http` internally.\n  - Fits naturally into Laravel services, controllers, jobs, and console commands.\n\n- 🚧 **Actively evolving**\n  - Designed to be extended with more endpoints and helpers over time.\n\n---\n\n## Requirements\n\n- **PHP**: `8.2` or higher (aligned with Laravel / Illuminate 12.x)\n- **Laravel** (recommended)\n  - Or any environment where the Laravel HTTP client \u0026 facades are available.\n- **Composer**\n\nNamespace \u0026 autoload notes:\n\n- SDK namespaces: `Cronixweb\\Streamline\\...`\n- Ensure your Composer autoload maps:\n\n```json\n{\n  \"autoload\": {\n    \"psr-4\": {\n      \"Cronixweb\\\\Streamline\\\\\": \"src/\"\n    }\n  }\n}\n```\n\nIf you install via Packagist, this will typically be preconfigured.\n\n---\n\n## Installation\n\nInstall via Composer in your Laravel project:\n\n```bash\ncomposer require cronixweb/streamline-sdk\n```\n\n\u003e If you’re still developing locally or using this via a path repository, point your project’s `repositories` section to your checkout and map the namespace to `src/`.\n\nExample (path repository) in your app’s `composer.json`:\n\n```json\n{\n  \"repositories\": [\n    {\n      \"type\": \"path\",\n      \"url\": \"packages/cronixweb/streamline-sdk\"\n    }\n  ],\n  \"require\": {\n    \"cronixweb/streamline-sdk\": \"*\"\n  }\n}\n```\n\nThen regenerate the autoloader:\n\n```bash\ncomposer dump-autoload\n```\n\n---\n\n## Configuration\n\nThe SDK requires your Streamline API credentials: `token_key` and `token_secret`.\n\n**1. Environment variables**\n\n```bash\n# .env\nSTREAMLINE_TOKEN_KEY=your_token_key\nSTREAMLINE_TOKEN_SECRET=your_token_secret\n```\n\n**2. Service configuration**\n\n```php\n// config/services.php\nreturn [\n    // ...\n    'streamline' =\u003e [\n        'token_key'    =\u003e env('STREAMLINE_TOKEN_KEY'),\n        'token_secret' =\u003e env('STREAMLINE_TOKEN_SECRET'),\n    ],\n];\n```\n\nYou can override this with your own config file or secrets manager if needed.\n\n---\n\n## Quick Start\n\nIn a Laravel controller, job, or service class:\n\n```php\nuse Cronixweb\\Streamline\\Streamline;\n\n$apiKey    = config('services.streamline.token_key');\n$apiSecret = config('services.streamline.token_secret');\n\n$streamline = Streamline::api($apiKey, $apiSecret);\n\n// Fetch first page of properties\n$properties = $streamline-\u003eproperties()-\u003eall();\n\n// Fetch a single property by unit_id\n$property = $streamline-\u003eproperties()-\u003efind(12345);\n```\n\nFrom here you can traverse into scoped clients (amenities, gallery images, etc.) or call dedicated top-level clients.\n\n---\n\n## Usage\n\n\u003e Unless otherwise noted, **dates are in `MM/DD/YYYY` format** as expected by Streamline.\n\nAll examples below assume you’ve already instantiated `Streamline` as shown in [Quick Start](#quick-start).\n\n### Properties\n\nList properties:\n\n```php\n$properties = $streamline-\u003eproperties()-\u003eall();\n```\n\nGet a single property by `unit_id`:\n\n```php\n$property = $streamline-\u003eproperties()-\u003efind(12345);\n```\n\nTraverse to related, property-scoped clients:\n\n```php\n$propClient    = $streamline-\u003eproperties();\n$amenities     = $propClient-\u003eamenities(12345)-\u003eall();      // AmenitiesClient\n$galleryImages = $propClient-\u003egalleryImages(12345)-\u003eall();  // GalleryImagesClient\n$reviews       = $propClient-\u003ereviews(12345)-\u003eall();        // ReviewsClient\n$rates         = $propClient-\u003epropertyRates(12345)-\u003eall();  // PropertyRatesClient\n```\n\n---\n\n### Amenities\n\nGet amenities for a unit:\n\n```php\n$amenities = $streamline\n    -\u003eproperties()\n    -\u003eamenities(12345)\n    -\u003eall();\n\n// Or via a dedicated client:\n// $amenities = $streamline-\u003eamenities()-\u003egetPropertyAmenities(12345);\n```\n\n---\n\n### Gallery Images\n\nGet gallery images for a unit:\n\n```php\n$images = $streamline\n    -\u003eproperties()\n    -\u003egalleryImages(12345)\n    -\u003eall();\n\n// Or via a dedicated client:\n// $images = $streamline-\u003egalleryImages()-\u003egetPropertyGalleryImages(12345);\n```\n\nEach item is parsed into a gallery-image model (array/object), mirroring the underlying API fields.\n\n---\n\n### Reviews\n\nGet guest reviews, optionally scoped and filtered:\n\n```php\nuse Cronixweb\\Streamline\\Utils\\ReviewsClient; // for type hints, if desired\n\n// Scoped to a unit via properties client\n$reviews = $streamline-\u003eproperties()-\u003ereviews(12345)-\u003eall();\n\n// Or using the method with filters\n$reviews = $streamline-\u003ereviews()-\u003egetGuestReviews(\n    housekeeperId: null,   // e.g. 789\n    unitId:       12345,\n    returnAll:    true\n);\n```\n\n---\n\n### Booked / Blocked Days\n\nFetch blocked days for **one** unit:\n\n```php\n$blocked = $streamline-\u003ebookedDates()-\u003egetBlockedDaysForUnit(\n    unitId:           12345,\n    startdate:        '01/01/2025', // optional\n    enddate:          '01/31/2025', // optional\n    displayB2BBlocks: true,         // optional\n    allowInvalid:     false,        // optional\n    owningId:         null          // optional, single unit only\n);\n```\n\nFetch blocked days for **multiple** units (requires `enddate`):\n\n```php\n$blocked = $streamline-\u003ebookedDates()-\u003egetBlockedDaysForUnit(\n    unitId:           [12345, 67890],\n    startdate:        '01/01/2025',\n    enddate:          '01/31/2025',\n    displayB2BBlocks: true,\n    allowInvalid:     false\n);\n```\n\nReturns an array of booked/blocked date items parsed from the API.\n\n---\n\n### Property Rates\n\nThere are two primary ways to fetch rates.\n\n#### 1. High-level `all()` helper\n\nThe `all()` method accepts an options array and handles validation + mapping:\n\n```php\n$rates = $streamline-\u003epropertyRates()-\u003eall([\n    'unit_id'                      =\u003e 12345,\n    'startdate'                    =\u003e '01/01/2025',\n    'enddate'                      =\u003e '01/31/2025',\n\n    // Optional flags:\n    'use_room_type_logic'          =\u003e true,\n    'dailyChangeOver'              =\u003e false,\n    'use_homeaway_max_days_notice' =\u003e false,\n\n    // Provide either of the following (not both):\n    // 'rate_type_ids' =\u003e [1, 2, 3],\n    // or nested:\n    // 'rate_types'    =\u003e ['id' =\u003e [1, 2, 3]],\n\n    'show_los_if_enabled'          =\u003e true,\n    'max_los_stay'                 =\u003e 14,   // requires show_los_if_enabled = true\n    'use_adv_logic_if_defined'     =\u003e false,\n]);\n```\n\n#### 2. Explicit typed method\n\n```php\n$rates = $streamline-\u003epropertyRates()-\u003egetPropertyRates(\n    unitId:                   12345,\n    startdate:                '01/01/2025',\n    enddate:                  '01/31/2025',\n    useRoomTypeLogic:         null,\n    dailyChangeOver:          null,\n    useHomeawayMaxDaysNotice: null,\n    rateTypeIds:              [1, 2],\n    showLosIfEnabled:         true,\n    maxLosStay:               14,\n    useAdvLogicIfDefined:     null\n);\n```\n\n**Validation rules enforced by the client:**\n\n- `unit_id` must be a positive integer.\n- `startdate` and `enddate` must be in `MM/DD/YYYY` format.\n- `dailyChangeOver` and `use_homeaway_max_days_notice` cannot be used together.\n- If `max_los_stay` is set:\n  - Must be between `1` and `180`.\n  - Requires `show_los_if_enabled = true`.\n\nReturned items are parsed into `PropertyRate` model structures.\n\n---\n\n### Token Renewal\n\nRefresh/rotate your token pair:\n\n```php\n$new = $streamline-\u003erefreshToken();\n\n// Example response:\n// [\n//     'apikey'    =\u003e '...',\n//     'apiSecret' =\u003e '...',\n// ]\n```\n\nThe `Streamline` instance automatically updates its internal client with the new credentials.  \nIf you persist credentials externally (DB, secrets store, etc.), make sure to store the new values.\n\n---\n\n## Error Handling\n\nMost client methods may throw:\n\n- `Cronixweb\\Streamline\\Exceptions\\StreamlineApiException`\n  - When the API returns an error or an unexpected/malformed payload.\n- `Illuminate\\Http\\Client\\ConnectionException`\n  - For network/transport-level issues.\n- `InvalidArgumentException`\n  - When you pass invalid inputs (e.g., bad dates, missing `unit_id`, invalid flags).\n\nRecommended pattern:\n\n```php\nuse Cronixweb\\Streamline\\Exceptions\\StreamlineApiException;\nuse Illuminate\\Http\\Client\\ConnectionException;\n\ntry {\n    $rates = $streamline\n        -\u003epropertyRates()\n        -\u003egetPropertyRates(12345, '01/01/2025', '01/31/2025');\n} catch (StreamlineApiException $e) {\n    // Handle API-level error (log, alert, transform to domain exception, etc.)\n} catch (ConnectionException $e) {\n    // Handle network/transport errors (timeouts, DNS issues, etc.)\n} catch (\\InvalidArgumentException $e) {\n    // Handle invalid input before hitting the API\n}\n```\n\n---\n\n## Date Formats \u0026amp; Common Parameters\n\n- **Dates**\n  - Always `MM/DD/YYYY` strings.\n  - The SDK does basic validation where appropriate.\n- **Boolean flags**\n  - Sent as `1`/`0` integers per Streamline conventions.\n- **Multiple IDs**\n  - Some endpoints accept multiple `unit_id`s.\n  - Arrays are automatically translated to comma-separated strings.\n\n---\n\n## FAQ \u0026amp; Notes\n\n**Is this Laravel-only?**\n\n- The SDK uses `Illuminate\\Support\\Facades\\Http`.  \n  It’s designed with Laravel in mind, but any framework/bootstrap that provides the necessary Illuminate components can work.\n\n**What about pagination?**\n\n- If a Streamline endpoint supports pagination, pass the pagination parameters through the relevant `all($body)` or method calls.\n- This SDK doesn’t currently abstract pagination; you control page size and offsets directly.\n\n**Why does the SDK sometimes flatten or wrap data differently from the raw API?**\n\n- The Streamline API sometimes returns:\n  - A single object for one result, or\n  - An array for multiple.\n- The SDK normalizes common cases to consistent lists/collections to simplify your application code.\n\n**Namespace reminder**\n\n- All code is under `Cronixweb\\Streamline\\...`.  \n  Ensure your autoloader maps that namespace to `src/` (or equivalent) when consuming the package.\n\n---\n\n## Cronix LLC · Services \u0026amp; Support\n\nThis SDK is built and maintained by **[Cronix LLC](https://cronixweb.com)** — a full-service digital marketing and eCommerce development agency specializing in **custom eCommerce websites, apps, and integrations**.\n\nIf you’re using **[Streamline Vacation Rental Software](https://www.streamlinevrs.com)** for:\n\n- Vacation rentals\n- Travel \u0026amp; hospitality\n- Property management platforms\n- Custom B2B booking portals\n\n…Cronix can help you:\n\n- Architect Streamline-backed Laravel or headless storefronts\n- Build performance-optimized APIs and dashboards\n- Design beautiful, conversion-oriented frontends\n- Maintain and evolve your integration over time\n\n📞 **Let’s talk about your project**\n\n- Website: https://cronixweb.com  \n- Contact: https://cronixweb.com/contact-us  \n- Request a quote: https://cronixweb.com/request-a-quote  \n- Email: `sales@cronixweb.com`\n\n\u003e Ignite your ideas. Let’s chat and turn them into reality.\n\n---\n\n## Contributing\n\nContributions are welcome!\n\n1. Fork the repository\n2. Create your feature branch: `git checkout -b feature/my-awesome-feature`\n3. Commit your changes: `git commit -m \"Add my awesome feature\"`\n4. Push the branch: `git push origin feature/my-awesome-feature`\n5. Open a Pull Request describing:\n   - The problem\n   - Your changes\n   - Any breaking impacts or migration notes\n\nPlease include reproducible examples or failing tests whenever possible.\n\n---\n\n## License\n\nThis SDK is released under the **MIT License**.  \nSee the `LICENSE` file for full details.\n\n---\n\n## Resources \u0026amp; Bibliography\n\n- Streamline VRS API JSON Docs:  \n  https://partner.streamlinevrs.com/apidocs/api-group\n- Streamline VRS JSON API endpoint:  \n  https://web.streamlinevrs.com/api/json\n- Streamline VRS website:  \n  https://www.streamlinevrs.com\n- Laravel HTTP Client (Illuminate 12.x):  \n  https://laravel.com/docs/12.x/http-client\n- PSR-4 Autoloading (Composer):  \n  https://getcomposer.org/doc/04-schema.md#psr-4\n- PHP Manual:  \n  https://www.php.net/manual/en/\n\n---\n\n\u003csub\u003eLast updated: 2025-11-14\u003c/sub\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcronixweb%2Fstreamline-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcronixweb%2Fstreamline-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcronixweb%2Fstreamline-sdk/lists"}