{"id":19504839,"url":"https://github.com/nice-digital/hyperbone-model-with-io","last_synced_at":"2026-02-27T14:09:47.714Z","repository":{"id":141113667,"uuid":"272513036","full_name":"nice-digital/hyperbone-model-with-io","owner":"nice-digital","description":"Used by Publications. Hyperbone models but with added AJAX","archived":false,"fork":false,"pushed_at":"2014-11-13T09:41:30.000Z","size":668,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-27T16:36:33.049Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"green-mesa/hyperbone-model-with-io","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nice-digital.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-15T18:21:00.000Z","updated_at":"2023-12-22T12:41:28.000Z","dependencies_parsed_at":"2023-03-13T10:36:47.517Z","dependency_job_id":null,"html_url":"https://github.com/nice-digital/hyperbone-model-with-io","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/nice-digital/hyperbone-model-with-io","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2Fhyperbone-model-with-io","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2Fhyperbone-model-with-io/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2Fhyperbone-model-with-io/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2Fhyperbone-model-with-io/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nice-digital","download_url":"https://codeload.github.com/nice-digital/hyperbone-model-with-io/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2Fhyperbone-model-with-io/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29899097,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T12:09:13.686Z","status":"ssl_error","status_checked_at":"2026-02-27T12:09:13.282Z","response_time":57,"last_error":"SSL_read: 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":"2024-11-10T22:27:23.709Z","updated_at":"2026-02-27T14:09:47.700Z","avatar_url":"https://github.com/nice-digital.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hyperbone Model (With IO)\r\n\r\n## This module is no longer being maintained\r\n\r\nIt is replaced by [HalogenJS Resource](https://github.com/halogenjs/resource). \r\n\r\n[![Build Status](https://travis-ci.org/green-mesa/hyperbone-model-with-io.png?branch=master)](https://travis-ci.org/green-mesa/hyperbone-model-with-io)\r\n\r\n## tldr; \r\n\r\nAdds HTTP interactions to Hyperbone Models. Ridiculously early push this.\r\n\r\n## Intro\r\n\r\nAdds a 'fetch' method for loading a Hypermedia resource from a server, and a 'execute' method for sending Command data to a server. \r\n\r\n## Installation\r\n\r\nInstall with [npm(1)](http://npmjs.org):\r\n\r\n```sh\r\n$ npm install --save hyperbone-model-with-io\r\n```\r\n\r\n## Tests\r\n\r\nIf you don't already have grunt..\r\n```sh\r\n$ npm install -g grunt-cli\r\n```\r\nAfter cloning the repo..\r\n```sh\r\n$ npm install\r\n```\r\nTo run the tests\r\n```sh\r\n$ npm test\r\n```\r\n\r\n\r\n## Usage\r\n\r\nInstead of ...\r\n\r\n```js\r\nvar Model = require('hyperbone-model').Model;\r\n```\r\n\r\ndo...\r\n\r\n```js\r\nvar Model = require('hyperbone-model-with-io').Model;\r\n```\r\n\r\n## API\r\n\r\n### .fetch()\r\n\r\nAssuming your model has a self href, it will load the hypermedia and fire a `sync` event, as per normal Backbone. Parameters in the callback\r\nare the model and the request response.\r\n\r\n### .execute( \"command name\" )\r\n\r\nIf you're using the '_commands' functionality, calling `.execute` will seralise the command's properties and PUT/POST/DELETE etc to the specified HREF. \r\n\r\nHTTP error codes 201, 200 and 202 are considered successful. ANything else counts as an error. \r\nOn success, a .fetch() automatically happens. If it's an error this doesn't happen. \r\n\r\nIt will also trigger `executed` or `execution-failed` which is passed the command that failed. This should bubble up to the parent model.\r\n\r\n### .execute( \"command name\", callback )\r\n\r\nIf you pass a callback, instead of an automatic .fetch() happening your callback is called so you can manually decide whether or not to resync.\r\n\r\nThe parameters passed to the callback are `err` and `response`. 201, 200 and 202 are considered successful. ANything else counts as an error.\r\n\r\nIt will also trigger `executed` or `execution-failed`, which is passed the command that failed.\r\n\r\nAnd this gives you Hyperbone Models with the HTTP extensions. This module is badly named really. This should bubble up to the parent model.\r\n\r\n\r\n## License\r\n\r\n  MIT\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnice-digital%2Fhyperbone-model-with-io","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnice-digital%2Fhyperbone-model-with-io","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnice-digital%2Fhyperbone-model-with-io/lists"}