{"id":20904698,"url":"https://github.com/sage/sdatajavascriptclientlib","last_synced_at":"2025-05-13T05:30:48.368Z","repository":{"id":879921,"uuid":"624409","full_name":"Sage/SDataJavaScriptClientLib","owner":"Sage","description":"Client library in JavaScript for consuming SData web services. Also, an HTML/CSS/JavaScript Mobile application framework.","archived":true,"fork":false,"pushed_at":"2017-03-25T11:29:41.000Z","size":3425,"stargazers_count":29,"open_issues_count":1,"forks_count":6,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-24T01:37:02.418Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-04-22T22:51:39.000Z","updated_at":"2024-07-25T14:56:02.000Z","dependencies_parsed_at":"2022-08-16T11:20:11.009Z","dependency_job_id":null,"html_url":"https://github.com/Sage/SDataJavaScriptClientLib","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sage%2FSDataJavaScriptClientLib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sage%2FSDataJavaScriptClientLib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sage%2FSDataJavaScriptClientLib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sage%2FSDataJavaScriptClientLib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sage","download_url":"https://codeload.github.com/Sage/SDataJavaScriptClientLib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253882713,"owners_count":21978540,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-18T13:18:32.611Z","updated_at":"2025-05-13T05:30:47.397Z","avatar_url":"https://github.com/Sage.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Information\n\nThis repository contains a JavaScript library for consuming [SData](http://sdata.sage.com).\n\n## Downloading\n\n* [minified](http://github.com/SageScottsdalePlatform/SDataJavaScriptClientLib/raw/master/deploy/sdata-client.js)\n* [debug](http://github.com/SageScottsdalePlatform/SDataJavaScriptClientLib/raw/master/deploy/sdata-client-debug.js)\n\n## Building A Release Version\n\n### Requirements\n\n*\tWindows\n*\tThe Java Runtime (JRE)\n*\tThe environment variable, `JAVA_HOME`, pointing to the JRE base path, eg:\n\n\t\tc:\\Program Files (x86)\\Java\\jre6\n\n### Steps\n\n2.\tOpen a command prompt and execute the following from the root repository folder, eg:\n\n\t\tbuild\\release.cmd\n3.\tThe deployed product will be in a `deploy` folder in the root repository folder.\n\n## Examples\n\n#### Example: Set up an SData service connection (to be used for rest of examples)\n\tvar service = new Sage.SData.Client.SDataService({\n\t    url: 'http://localhost/sdata/slx/dynamic/-/',\n\t    userName: 'admin',\n\t    password: '',\n\t    json: true //if your SData provider supports JSON\n\t});\n\n#### Example: Make a single resource request (Contact)\n\tvar request = new Sage.SData.Client.SDataSingleResourceRequest(service)\n\t\t.setResourceKind('contacts')\n\t\t.setResourceSelector(\"'CGHEA0000001'\");\n\t    \n\trequest.read({\n\t    success: function(entry) { console.log(entry); }\n\t});\n\n#### Example: Request a resource collection (Contacts)\n\tvar request = new Sage.SData.Client.SDataResourceCollectionRequest(service)\n\t    .setResourceKind('contacts')\n\t    .setCount(5)\n\t    .setStartIndex(6); // 1 based, not 0 based (per spec)\n\t    \n\trequest.read({\n\t    success: function(feed) { console.log(feed); }\n\t});\n\n#### Example: Request all of the Contacts for a particular Account\n\tvar request = new Sage.SData.Client.SDataResourcePropertyRequest(service)\n\t    .setResourceKind('accounts')\n\t    .setResourceSelector(\"'AGHEA0002669'\")\n\t    .setResourceProperty('Contacts')\n\t    \n\t// use `readFeed` since we are targeting a collection property\n\trequest.readFeed({\n\t    success: function(feed) { console.log(feed); }\n\t});\n\n#### Example: Batch request (combine two account queries)\n\tvar batch = new Sage.SData.Client.SDataBatchRequest(service)\n\t    .setResourceKind('accounts')\n\t    .using(function() {\n\t        new Sage.SData.Client.SDataSingleResourceRequest(service)\n\t            .setResourceKind('accounts')\n\t            .setResourceSelector(\"'AGHEA0002669'\")\n\t            .read();\n\t        \n\t        new Sage.SData.Client.SDataSingleResourceRequest(service)\n\t            .setResourceKind('accounts')\n\t            .setResourceSelector(\"'AA2EK0013031'\")\n\t            .read();        \n\t    });\n\t    \n\tbatch.commit({\n\t    success: function(feed) { console.log(feed); }\n\t});","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsage%2Fsdatajavascriptclientlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsage%2Fsdatajavascriptclientlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsage%2Fsdatajavascriptclientlib/lists"}