# API - B. Plus

Base URL is ~~`https://bdfd-support.bdfd-team1.repl.co/`~~

## ~~GET JSON~~

## ~~Information about B. Plus Status with JSON.~~

~~<mark style="color:blue;">`GET`</mark>~~ \~\~ `B. Plus STATUS`\~\~

~~Returns JSON object with <mark style="color:purple;">B. Plus</mark> status.~~

~~Endpoint:~~ \
~~`https://bdfd-support.bdfd-team1.repl.co/premium/get`~~

#### Path Parameters

| Name                                                   | Type          | Description |
| ------------------------------------------------------ | ------------- | ----------- |
| ~~?userid={userID)<mark style="color:red;">\*</mark>~~ | ~~Snowflake~~ |             |

{% tabs %}
{% tab title="No answer" %}

```
DELETED
```

{% endtab %}

{% tab title="No answer" %}

```
DELETED
```

{% endtab %}

{% tab title="No answer" %}

<pre><code><strong>DELETED
</strong></code></pre>

{% endtab %}

{% tab title="No answer" %}

```
DELETED
```

{% endtab %}
{% endtabs %}

## ~~BDFD - Guide~~

### ~~Example (Main)~~

~~(NOT REQUIRD)~~

~~Language: `BDScript 2`~~\
~~Variables: none~~\
~~Trigger: `!wallet` or `!premium`~~\
~~Code:~~

```php
$nomention
$botTyping
$reply
$allowUserMentions[]

$httpGet[https://bdfd-support.bdfd-team1.repl.co/premium/get?userid=$authorID]
$jsonParse[$httpResult]

$var[color;HERE COLOR EMBED] $c[// CHANGE IT!!!]
$var[time;$replaceText[$if[$json[status]==false] 0 $else $json[premium;end] $endif; ;]]
$var[nick;$if[$json[status]==false] $username $else $json[premium;username] $endif]

$color[$var[color]]
$author[B. Plus]
$authorIcon[$userAvatar[$botID]]
$description[Welcome, **$var[nick]** to the B. Plus System!]
$addField[Status;> $if[$var[time]<$getTimestamp] ` Disabled ` $else ` Enabled ` ( <t:$var[time]:R> )$endif]

$addButton[no;https://bdfd-support.bdfd-team1.repl.co/premium/get?userid=$authorID;API Card;link]
```

### ~~Example (Bonus)~~

~~(ITS PART OF CODE)~~

~~Language: `BDScript 2`~~\
~~Code:~~

```php
$httpGet[https://bdfd-support.bdfd-team1.repl.co/premium/get?userid=$authorID]
$jsonParse[$httpResult]

$var[time;$replaceText[$if[$json[status]==false] 0 $else $json[premium;end] $endif; ;]]
$var[nick;$if[$json[status]==false] $username $else $json[premium;username] $endif]

$if[$var[time]>$getTimestamp]
  $c[// BONUS CODE HERE!!!]
$endif
```

### ~~Structure~~

~~`$json[status]` - returns premium status (false/true)~~\
~~`$json[premium;start]` - returns the premium purchase time (Unix)~~\
~~`$json[premium;end]` / `$var[time]` - returns the premium expiration time (Unix)~~\
~~`$json[premium;username]` / `$var[nick]` - return username~~

## ~~BDFD Links~~

~~`$var[]` -~~ [~~BDScript/var~~](https://nilpointer-software.github.io/bdfd-wiki/nightly/bdscript/var.html)\
~~`$jsonParse[]` -~~ [~~Guide#jsonparse~~](https://nilpointer-software.github.io/bdfd-wiki/nightly/guides/general/jsonFunctions.html#jsonparse)\
~~`$json[]` -~~ [~~Guide#json~~](https://nilpointer-software.github.io/bdfd-wiki/nightly/guides/general/jsonFunctions.html#json)\
~~`$httpGet[]` -~~ [~~Guide#httpget~~](https://nilpointer-software.github.io/bdfd-wiki/nightly/guides/general/httpRequests.html#http-request-types)\
~~`$httpResult[]` -~~ [~~Guide#httpresult~~](https://nilpointer-software.github.io/bdfd-wiki/nightly/guides/general/httpRequests.html#http-request-types)\
~~`$if[]` -~~ [~~BDScript/if~~](https://nilpointer-software.github.io/bdfd-wiki/nightly/bdscript/if.html)\
~~`$endif` -~~ [~~BDScript/endif~~](https://nilpointer-software.github.io/bdfd-wiki/nightly/bdscript/endif.html)\
~~`$c[]` -~~ [~~BDScript/c~~](https://nilpointer-software.github.io/bdfd-wiki/nightly/bdscript/c.html)\
~~`$getTimestamp` -~~ [~~BDScript/gettimestamp~~](https://nilpointer-software.github.io/bdfd-wiki/nightly/bdscript/getTimestamp.html)
