Skip to content

Commit

Permalink
Merge pull request #1 from lucasstarsz/master
Browse files Browse the repository at this point in the history
Change README to Markdown
  • Loading branch information
Yeffian authored Jul 14, 2021
2 parents 65fca4d + da9ac32 commit 38477df
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
<h1 align="center">Pastemyst.java</h1>
<div align="center">

# Pastemyst.java
</div>

<p><strong>pastemyst.java</strong> is a API Wrapper, written in Java. The library is in early development, and all contributions are welcome.</p>
<p>Check out Pastemyst here https://paste.myst.rs/</p>
## What is pastemyst.java?
**pastemyst.java** is a [pastemyst][pastemyst-link] API Wrapper, written in Java. The library is in early development, and all contributions are welcome.

<h2>Get the language by name and extension</h2>
Check out pastemyst here: [paste.myst.rs][pastemyst-link]


## Examples

### Get the language by name and extension
```java
import io.github.yeffycodegit.pastemystjava.lib.Pastemyst;
import io.github.yeffycodegit.pastemystjava.types.Language;

import java.io.IOException;

public class Main {
public static void main(String[] args) throws IOException, InterruptedException {
public static void main(String[] args) throws IOException, InterruptedException {
Pastemyst pastemyst = new Pastemyst();

Language langByName = pastemyst.data.getLangByName("Python");
Expand All @@ -21,22 +28,20 @@ public class Main {
}
```

<h2>Get when the paste should expire</h2>

### Get when the paste should expire
```java
import io.github.yeffycodegit.pastemystjava.lib.Pastemyst;

public class Main {
public static void main(String[] args) {
public static void main(String[] args) {
Pastemyst pastemyst = new Pastemyst();

System.out.println(pastemyst.time.whenPasteShouldExpire("1588441258", "1w"));
}
}
```

<h2>Get a user on pastemyst/if a user exists on pastemyst</h2>

### Get a user on pastemyst/if a user exists on pastemyst
```java
import io.github.yeffycodegit.pastemystjava.lib.Pastemyst;
import io.github.yeffycodegit.pastemystjava.types.User;
Expand All @@ -51,4 +56,7 @@ public class Main {
boolean exists = pastemyst.user.getIfUserExists("CodeMyst");
}
}
```
```


[pastemyst-link]: https://github.com/codemyst/pastemyst "pastemyst on Github"

0 comments on commit 38477df

Please sign in to comment.