Skip to content

Commit

Permalink
Merge pull request #2 from YaourtGG/master
Browse files Browse the repository at this point in the history
First docs for streamlabs4j
  • Loading branch information
PhilippHeuer authored Dec 30, 2018
2 parents 7fa7c96 + 4d1162f commit 52595ba
Show file tree
Hide file tree
Showing 13 changed files with 75 additions and 274 deletions.
6 changes: 3 additions & 3 deletions docs/config.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
baseURL = "http://github.com/twitch4j"
baseURL = "http://github.com/streamlabs4j"
languageCode = "en-us"
DefaultContentLanguage = "en"
defaultContentLanguageInSubdir = false
Expand All @@ -11,7 +11,7 @@ pygmentsStyle = "monokailight"

[Languages]
[Languages.en]
title = "Twitch4J - Official Documentation"
title = "Streamlabs4J - Official Documentation"
weight = 1
languageName = "English"

Expand All @@ -34,5 +34,5 @@ home = [ "HTML", "RSS", "JSON"]
pre = "<h3>More</h3>"
name = "<i class='fa fa-github'></i> <label>Github repo</label>"
identifier = "ds"
url = "https://github.com/twitch4j/twitch4j"
url = "https://github.com/twitch4j/streamlabs4j"
weight = 10
2 changes: 1 addition & 1 deletion docs/content/_footer.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
© 2018 - Twitch4J
© 2019 - Twitch4J
53 changes: 51 additions & 2 deletions docs/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,55 @@ description = ""

# Streamlabs4J

## Overview

* [Getting Started](./getting-started)

## Results of API Calls

This API Client provides you 3 methods to handle / process the results.

### Synchronous Execution

You can execute any api call synchronously with the execute() method, as shown in the following example:

```java
StreamlabsUser user = api.getUser(authToken).execute();
```

### Asynchronous Execution

You can execute any api call asynchronously with the queue() method, as shown in the following example:

```java
Future<StreamlabsUser> userCall = api.getUser(authToken).queue();
```

You can retrieve the result of the command by using the Future:

```java
StreamlabsUser user = userCall.get();
```

### Reactive Execution

You can also observe the results of any api call as an Observable by using one of the following methods:

* observe() — returns a “hot” Observable that executes the command immediately, though because the Observable is filtered through a ReplaySubject you are not in danger of losing any items that it emits before you have a chance to subscribe
* toObservable() — returns a “cold” Observable that won’t execute the command and begin emitting its results until you subscribe to the Observable

```java
Observable<StreamlabsUser> userObservable = api.getUser(authToken).observe();
```

You then retrieve the value of the command by subscribing to the Observable:

```java
userObservable.subscribe(data -> {
// your code to work with the result data
});
```

## Contribute to this documentation
Feel free to update this content, just click the **Edit this page** link displayed on top right of each page, and pullrequest it
{{%alert%}}Your modification will be deployed automatically when merged.{{%/alert%}}

Feel free to update this content, just edit the files in `docs/content` as usual markdown files and send a pull request.
24 changes: 0 additions & 24 deletions docs/content/events/ChannelMessageEvent.md

This file was deleted.

24 changes: 0 additions & 24 deletions docs/content/events/IrcMessageEvent.md

This file was deleted.

14 changes: 0 additions & 14 deletions docs/content/events/_index.md

This file was deleted.

12 changes: 4 additions & 8 deletions docs/content/getting-started/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,10 @@ title="Getting started"
weight = 1
+++

# Twitch4J
# Streamlabs4J

Welcome and thanks for using Twitch4J!
Welcome and thanks for using Streamlabs4J!

Please check out the [Installation](./installation) page to install the Twitch4J dependency.
Please check out the [Installation](./installation) page to install the Streamlabs4J dependency.

After that the [Client-Builder](./client-builder) will show you how to create a Twitch4J Instance.

Now you'r ready to check out a few example projects:

* [Twitch4J Chatbot](https://github.com/twitch4j/twitch4j-chatbot)
After that the [Client-Builder](./client-builder) will show you how to create a Streamlabs4J instance.
21 changes: 7 additions & 14 deletions docs/content/getting-started/client-builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,16 @@ title="Client-Builder"
weight = 5
+++

# Twitch4J Client Builder
# Streamlabs4J Client Builder

## All Features
Initialize the Twitch4J Client and specify which modules you want to use:
Initialize the Streamlabs4J Client using the clientId and clientSecret you got after [registering your app](https://streamlabs.com/dashboard#/apps/register):

```java
TwitchClient twitchClient = TwitchClientBuilder.builder()
.withEnableHelix(true)
.build();
StreamlabsApi api = StreamlabsApiBuilder.builder()
.withClientId("yourClientId")
.withClientSecret(yourClientSecret)
.build();
```

## Overwrite the EventManager for Cross-Library Usage

You can overwrite the native EventManager with a commonly used one to share events between Twitch4J and other 3rd party libraries.

```java
TwitchClient twitchClient = TwitchClientBuilder.builder()
.withEventManager(eventManager)
.build();
```
You can now interract with the api using the obect you have just created !
12 changes: 4 additions & 8 deletions docs/content/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ weight = 2

# Installation

We recommend using a dependency management tool to manage twitch4j and sub dependencies. As a fallback method you can also download a fatJar.
We recommend using a dependency management tool to manage streamlabs4j and sub dependencies.

## Gradle
Add it to your build.gradle with:
Expand All @@ -18,7 +18,7 @@ and: (latest, you should use the actual version here)

```groovy
dependencies {
compile 'com.github.twitch4j:twitch4j:v0.13.0'
compile 'com.github.twitch4j:streamlabs4j:1.0.0'
}
```

Expand All @@ -37,11 +37,7 @@ and: (latest, you should use the actual version here)
```xml
<dependency>
<groupId>com.github.twitch4j</groupId>
<artifactId>twitch4j</artifactId>
<version>v0.13.0</version>
<artifactId>streamlabs4j</artifactId>
<version>1.0.0</version>
</dependency>
```

## fatJar

[Download](http://localhost)
125 changes: 0 additions & 125 deletions docs/content/rest-helix/_index.md

This file was deleted.

Loading

0 comments on commit 52595ba

Please sign in to comment.