diff --git a/src/pages/docs.html b/src/pages/docs.html index ba971d2..6afb5c9 100644 --- a/src/pages/docs.html +++ b/src/pages/docs.html @@ -1,12 +1,75 @@
-

Docs

+

Docs

+
+ +
+ +

Getting Started

+ +

Create a free Userbase account

+

First you need a Userbase account. You will be able to create a free account when Userbase gets launched. No credit card required.

+ +

Install the SDK

+

Then you need to include the Userbase SDK into your web app.

+

You can either include the SDK with a <script> tag:

+ +
+    <script type="text/javascript"
+  src="https://userbase-public.s3-us-west-2.amazonaws.com/userbase-js/userbase.js">
+</script>
+  
+ +

Or else you can include the SDK into your build pipeline:

+ +
+    npm --install --save userbase-js
+  
+ +

Set the Application ID

+

From your Userbase account, create a new App and get the Application ID. Then you just need to configure the Userbase SDK to use it:

+ +
+    userbase.configure({ appId: 'a43ae910-fc89-43fe-a7a3-a11a53b49325' })
+  
+ +

And you're all set.

+
+ +
+ +
+ +

SDK

+ +

You can use Userbase through a simple JavaScript SDK in the browser. The following is the complete set of Userbase APIs that let you create user accounts, handle logins, and persist user data.

+ +

Users

+

Use these APIs to create user accounts, handle logins and logouts, and resume sessions when a user returns to your web app.

+ + +

Data

+

Use these APIs to store and retrieve user data. All data handled by these APIs is highly-durable, immediately consistent, and end-to-end encrypted.

+ +
+
\ No newline at end of file diff --git a/src/pages/docs_getting-started.html b/src/pages/docs_getting-started.html deleted file mode 100644 index ff9d904..0000000 --- a/src/pages/docs_getting-started.html +++ /dev/null @@ -1,33 +0,0 @@ -
-

Docs : Getting Started

- -

Create a free Userbase account

-

First you need a Userbase account. You will be able to create a free account when Userbase gets launched. No credit card required.

- -

Install the SDK

-

Then you need to include the Userbase SDK into your web app.

-

You can either include the SDK with a <script> tag:

- -
-    <script type="text/javascript"
-  src="https://userbase-public.s3-us-west-2.amazonaws.com/userbase-js/userbase.js">
-</script>
-  
- -

Or else you can include the SDK into your build pipeline:

- -
-    npm --install --save userbase-js
-  
- -

Set the Application ID

-

From your Userbase account, create a new App and get the Application ID. Then you just need to configure the Userbase SDK to use it:

- -
-    userbase.configure({ appId: 'a43ae910-fc89-43fe-a7a3-a11a53b49325' })
-  
- -

And you're all set.

-
- -
\ No newline at end of file diff --git a/src/pages/docs_sdk.html b/src/pages/docs_sdk.html deleted file mode 100644 index e57b751..0000000 --- a/src/pages/docs_sdk.html +++ /dev/null @@ -1,26 +0,0 @@ -
-

Docs : SDK

- -

You can use Userbase through a simple JavaScript SDK in the browser. The following is the complete set of Userbase APIs that let you create user accounts, handle logins, and persist user data.

- -

Users

-

Use these APIs to create user accounts, handle logins and logouts, and resume sessions when a user returns to your web app.

- - -

Data

-

Use these APIs to store and retrieve user data. All data handled by these APIs is highly-durable, immediately consistent, and end-to-end encrypted.

- -
- -
\ No newline at end of file diff --git a/src/pages/docs_sdk_delete.html b/src/pages/docs_sdk_delete.html index d14d7b6..e045a96 100644 --- a/src/pages/docs_sdk_delete.html +++ b/src/pages/docs_sdk_delete.html @@ -1,5 +1,5 @@
-

Docs : SDK : Delete

+

SDK : Delete

Delete lets your delete an item from a user's database. This API with will return a promise that gets resolved once the item has been durably deleted from the database.

@@ -26,11 +26,15 @@ diff --git a/src/pages/docs_sdk_insert.html b/src/pages/docs_sdk_insert.html index 757aafc..26993c7 100644 --- a/src/pages/docs_sdk_insert.html +++ b/src/pages/docs_sdk_insert.html @@ -1,10 +1,10 @@
-

Docs : SDK : Insert

+

SDK : Insert

Insert lets your add items to a user's database. This API with will return a promise that gets resolved once the item has been durably inserted into the database.

-    userbase.insert(databaseName, itemId, item)
+    userbase.insert(databaseName, item, itemId)
   .then(() => {
     // item inserted
   })
@@ -21,7 +21,7 @@
       itemId [string | Len: 1-100] - The item's unique identifier.
     
     
  • - item [object | Max size: 100KB] - The item to insert. + item [object | Max size: 10 KB] - The item to insert.
  • @@ -29,12 +29,16 @@
    • DatabaseNotOpen
    • +
    • DatabaseNameCannotBeBlank
    • +
    • DatabaseNameTooLong
    • +
    • DatabaseNameMustBeString
    • ItemIdCannotBeBlank
    • ItemIdTooLong
    • ItemIdMustBeString
    • ItemTooLarge
    • ItemAlreadyExists
    • AppIdNotSet
    • +
    • AppIdNotValid
    • ServiceUnavailable
    diff --git a/src/pages/docs_sdk_open-database.html b/src/pages/docs_sdk_open-database.html index b5b7294..5fc3f1c 100644 --- a/src/pages/docs_sdk_open-database.html +++ b/src/pages/docs_sdk_open-database.html @@ -1,5 +1,5 @@
    -

    Docs : SDK : OpenDatabase

    +

    SDK : OpenDatabase

    OpenDatabase lets your retrieve data stored by the users of your web app. You also need to have a database open before storing or modify user data. This API with will return a promise that gets resolved once the database becomes available for use.

    @@ -21,11 +21,10 @@ changeHandler [function] - A callback that gets invoked when the database gets modified.
    • - items [object] - The full collection of items in the database, in insertion order. + items [Array] - The full collection of items in the database, in insertion order.
      • itemId [string] - The item's unique identifier.
      • item [object] - The stored item.
      • -
      • creationTime [Date] - The timestamp when the item was created.
    @@ -41,6 +40,7 @@
  • DatabaseNameMustBeString
  • ChangeHandlerMustBeFunction
  • AppIdNotSet
  • +
  • AppIdNotValid
  • ServiceUnavailable
  • diff --git a/src/pages/docs_sdk_sign-in-with-session.html b/src/pages/docs_sdk_sign-in-with-session.html index 9c25d3d..96180cb 100644 --- a/src/pages/docs_sdk_sign-in-with-session.html +++ b/src/pages/docs_sdk_sign-in-with-session.html @@ -1,5 +1,5 @@
    -

    Docs : SDK : SignInWithSession

    +

    SDK : SignInWithSession

    SignInWithSession lets you automatically log in a user using the last used session. This API with will return a promise that gets resolved once the session has been validated. If the session is valid, the user gets automatically logged in.

    @@ -24,8 +24,7 @@ user [object] - If set, this contains information about the logged in user.
    • username [string] - The user's username.
    • -
    • seed [string] - The user's encryption key.
    • -
    • creationTime [Date] - The timestamp when the user was created.
    • +
    • key [string] - The user's encryption key.
  • lastUsedUsername [string] - If set, this is the username of the last user that was logged in.
  • @@ -37,6 +36,7 @@
    • AppIdNotSet
    • +
    • AppIdNotValid
    • ServiceUnavailable
    diff --git a/src/pages/docs_sdk_sign-in.html b/src/pages/docs_sdk_sign-in.html index 5cf28fc..5463130 100644 --- a/src/pages/docs_sdk_sign-in.html +++ b/src/pages/docs_sdk_sign-in.html @@ -1,5 +1,5 @@
    -

    Docs : SDK : SignIn

    +

    SDK : SignIn

    SignIn lets your users log into your web app. This API with will return a promise that gets resolved once the user has been logged in.

    @@ -29,8 +29,7 @@ user [object] - Contains information about the logged in user.
    • username [string] - The user's username.
    • -
    • seed [string] - The user's encryption key.
    • -
    • creationTime [Date] - The timestamp when the user was created.
    • +
    • key [string] - The user's encryption key.
    @@ -47,6 +46,7 @@
  • PasswordTooLong
  • PasswordMustBeString
  • AppIdNotSet
  • +
  • AppIdNotValid
  • ServiceUnavailable
  • diff --git a/src/pages/docs_sdk_sign-out.html b/src/pages/docs_sdk_sign-out.html index 02eb273..bb74742 100644 --- a/src/pages/docs_sdk_sign-out.html +++ b/src/pages/docs_sdk_sign-out.html @@ -1,5 +1,5 @@
    -

    Docs : SDK : SignOut

    +

    SDK : SignOut

    SignOut lets your users log out of your web app. This API with will return a promise that gets resolved once the user has been logged out.

    @@ -14,7 +14,9 @@

    Errors

      +
    • UserNotSignedIn
    • AppIdNotSet
    • +
    • AppIdNotValid
    • ServiceUnavailable
    diff --git a/src/pages/docs_sdk_sign-up.html b/src/pages/docs_sdk_sign-up.html index a41543d..7125a57 100644 --- a/src/pages/docs_sdk_sign-up.html +++ b/src/pages/docs_sdk_sign-up.html @@ -1,5 +1,5 @@
    -

    Docs : SDK : SignUp

    +

    SDK : SignUp

    SignUp lets you create user accounts for your web app. This API with will return a promise that gets resolved once the user account has been created.

    @@ -29,8 +29,7 @@ user [object] - Contains information about the new user.
    • username [string] - The user's username.
    • -
    • seed [string] - The user's encryption key.
    • -
    • creationTime [Date] - The timestamp when the user was created.
    • +
    • key [string] - The user's encryption key.
    @@ -47,6 +46,7 @@
  • PasswordTooLong
  • PasswordMustBeString
  • AppIdNotSet
  • +
  • AppIdNotValid
  • ServiceUnavailable
  • diff --git a/src/pages/docs_sdk_transaction.html b/src/pages/docs_sdk_transaction.html index 5dc429c..890ab0e 100644 --- a/src/pages/docs_sdk_transaction.html +++ b/src/pages/docs_sdk_transaction.html @@ -1,5 +1,5 @@
    -

    Docs : SDK : Transaction

    +

    SDK : Transaction

         userbase.transaction(databaseName, operations)
    @@ -24,14 +24,19 @@
     
       
    • DatabaseNotOpen
    • +
    • DatabaseNameCannotBeBlank
    • +
    • DatabaseNameTooLong
    • +
    • DatabaseNameMustBeString
    • +
    • OperationsMustBeArray
    • ItemIdCannotBeBlank
    • ItemIdTooLong
    • ItemIdMustBeString
    • ItemTooLarge
    • ItemAlreadyExists
    • ItemDoesNotExist
    • -
    • UpdateConflict
    • +
    • ItemUpdateConflict
    • AppIdNotSet
    • +
    • AppIdNotValid
    • ServiceUnavailable
    diff --git a/src/pages/docs_sdk_update.html b/src/pages/docs_sdk_update.html index 3127bd2..6b13e82 100644 --- a/src/pages/docs_sdk_update.html +++ b/src/pages/docs_sdk_update.html @@ -1,10 +1,10 @@
    -

    Docs : SDK : Update

    +

    SDK : Update

    Update lets your modify an existing item in a user's database. This API with will return a promise that gets resolved once the item has been durably updated into the database.

    -    userbase.update(databaseName, itemId, item)
    +    userbase.update(databaseName, item, itemId)
       .then(() => {
         // item updated
       })
    @@ -21,7 +21,7 @@
           itemId [string | Len: 1-100] - The unique identifier of the item to replace.
         
         
  • - item [object | Max size: 100KB] - The object to overwrite the existing item with. + item [object | Max size: 10 KB] - The object to overwrite the existing item with.
  • @@ -29,12 +29,16 @@
    • DatabaseNotOpen
    • +
    • DatabaseNameCannotBeBlank
    • +
    • DatabaseNameTooLong
    • +
    • DatabaseNameMustBeString
    • ItemIdCannotBeBlank
    • ItemIdMustBeString
    • ItemTooLarge
    • ItemDoesNotExist
    • -
    • UpdateConflict
    • +
    • ItemUpdateConflict
    • AppIdNotSet
    • +
    • AppIdNotValid
    • ServiceUnavailable
    diff --git a/src/style.css b/src/style.css index 140e878..afbe1a1 100644 --- a/src/style.css +++ b/src/style.css @@ -110,4 +110,9 @@ ul { @apply font-semibold } +a.anchor { + @apply block relative; + top: -50px; +} + @tailwind utilities;