Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

Commit

Permalink
Move endpoint from wayscript.com to wayscript.io
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffbuswell committed Mar 11, 2020
1 parent e93ec6b commit 89731b0
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 7 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog
All notable changes to this project will be documented in this file.

## [0.1.1] - 2020-03-11
### Changed
- Move endpoint from wayscript.com to wayscript.io

## [0.1.0] - 2019-11-13
### Changed
- **BREAKING**: Convert SDK to adhere to the [WayScript HTTP Trigger](https://docs.wayscript.com/library/triggers/http-trigger) specification.
Expand Down Expand Up @@ -28,7 +32,8 @@ All notable changes to this project will be documented in this file.
## [0.0.3] - 2019-04-17
### Released SDK

[Unreleased]: https://github.com/wayscript/wayscript-js/compare/0.1.0...HEAD
[Unreleased]: https://github.com/wayscript/wayscript-js/compare/0.1.1...HEAD
[0.1.1]: https://github.com/wayscript/wayscript-js/compare/0.1.0...0.1.1
[0.1.0]: https://github.com/wayscript/wayscript-js/compare/0.0.7...0.1.0
[0.0.8]: https://github.com/wayscript/wayscript-js/compare/0.0.7...0.0.8
[0.0.7]: https://github.com/wayscript/wayscript-js/compare/0.0.5...0.0.7
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ npm install wayscript
Or load directly from CDN:

```html
<script src="https://cdn.wayscript.com/static/js/api/wayscript.0.1.0.js"></script>
<script src="https://cdn.wayscript.com/static/js/api/wayscript.0.1.1.js"></script>
```

## Basic Usage
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

const _post = function ( program_id, endpoint, query_param_str, body_params ) {
let xhr = new XMLHttpRequest();
const request_url = 'https://' + program_id + '.wayscript.com/' + endpoint + query_param_str;
const request_url = 'https://' + program_id + '.wayscript.io/' + endpoint + query_param_str;
xhr.open( "POST", request_url );
xhr.setRequestHeader( "Content-Type", "application/json" );
xhr.setRequestHeader( "X-WayScript-Api", "javascript" );
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wayscript",
"version": "0.1.0",
"version": "0.1.1",
"description": "WayScript gives you flexible building blocks to seamlessly integrate, automate and host tools in the cloud.",
"main": "index.js",
"directories": {
Expand Down
4 changes: 2 additions & 2 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ describe( 'wayscript', function () {

it( 'should allow onerror/onsuccess assignment', function ( done ) {
const onError = function onError( text ) {
expect( text ).to.be.equal( '{"error":"Script 1234 does not exist or does not have an active HTTP Trigger for this endpoint"}' );
expect( text ).to.contain( '{"Error":"You must copy this script in order for it to run."}' );
done();
};

Expand All @@ -89,7 +89,7 @@ describe( 'wayscript', function () {
expect( response._onError ).to.be.equal( onError );
expect( response._onSuccess ).to.be.equal( onSuccess );
expect( response.authorizationHeader ).to.be.equal( 'Bearer _DUMMY_API_KEY_DUMMY_API_KEY_DUMMY_API_KEY_' );
expect( response.requestUrl ).to.be.equal( 'https://1234.wayscript.com/My%20Function?var1=one%2C&var2=two%26&var3=three%3F' )
expect( response.requestUrl ).to.be.equal( 'https://1234.wayscript.io/My%20Function?var1=one%2C&var2=two%26&var3=three%3F' )
expect( response.requestParams ).to.be.equal( '?var1=one%2C&var2=two%26&var3=three%3F' );
expect( response.requestBody ).to.be.equal( BODY_PARAMS );
} );
Expand Down

0 comments on commit 89731b0

Please sign in to comment.