inital
This commit is contained in:
138
macaroni.md
Normal file
138
macaroni.md
Normal file
@@ -0,0 +1,138 @@
|
||||
---
|
||||
layout: page
|
||||
title: MacaroniPM - A PenguinMod API Wrapper for Python.
|
||||
permalink: /macaroni/
|
||||
---
|
||||
<img src="/assets/img/mac.png" alt="Macaroni logo" style="width:200px;"/>{: .left }
|
||||
## Special Thanks
|
||||
I would Like to say thanks to ianyourgod on discord for showing me the [ApiModual](https://github.com/PenguinMod/PenguinMod-ApiModule) for JS! It really helped me make Macaroni better! I also would like to say thanks to [scratchattach](https://github.com/TimMcCool/scratchattach) for the idea to even make this.
|
||||
|
||||
|
||||
> MacaroniPM 1.x.xcode will mostly no longer work.
|
||||
{: .prompt-warning }
|
||||
|
||||
> Using MacaroniPM for spam in PenguinMod **will** get your ip blocked
|
||||
{: .prompt-warning }
|
||||
|
||||
> Do **NOT** share your token with anyone!
|
||||
{: .prompt-danger }
|
||||
|
||||
> It is recomended to set both PID (if doing something with projects) and Token.
|
||||
{: .prompt-tips }
|
||||
|
||||
## `macaronipm.SetToken()` and `macaronipm.TOKEN`
|
||||
Sets your token into the `macaronipm.TOKEN` variable.
|
||||
|
||||
Example:
|
||||
``` python
|
||||
macaronipm.SetToken("ABCDEFG1234567")
|
||||
print(macaronipm.TOKEN)
|
||||
```
|
||||
|
||||
## `macaronipm.SetProject()` and `macaronipm.PID`
|
||||
Sets your project id into the `macaronipm.PID` variable.
|
||||
|
||||
Example:
|
||||
``` python
|
||||
macaronipm.SetProject("ABCD1234")
|
||||
print(macaronipm.PID)
|
||||
```
|
||||
|
||||
## The Misc Catagory
|
||||
### `macaronipm.misc()['LoveToggle']()`
|
||||
Toggles the Love button that you see in projects.
|
||||
|
||||
Example:
|
||||
``` python
|
||||
macaronipm.misc.LoveToggle("false")
|
||||
```
|
||||
|
||||
> The text "true" must be in quotes.
|
||||
{: .prompt-warning }
|
||||
|
||||
### `macaronipm.misc()['VoteToggle']()`
|
||||
Toggles the Check button that you see in projects.
|
||||
|
||||
Example:
|
||||
``` python
|
||||
macaronipm.misc.VoteToggle("true")
|
||||
```
|
||||
|
||||
### `macaronipm.misc()['follow']()`
|
||||
Follows the set target.
|
||||
|
||||
Example:
|
||||
``` python
|
||||
macaronipm.misc()['follow']("koffeejava")
|
||||
```
|
||||
|
||||
### `macaronipm.misc()['GetFeatured']`
|
||||
Grabs featured projects.
|
||||
|
||||
Example:
|
||||
``` python
|
||||
print(macaronipm.misc()['GetFeatured'][3])
|
||||
```
|
||||
> This function returns in arrays, so you can do `macaronipm.misc()['GetProject']()[0])`
|
||||
{: .prompt-tips }
|
||||
|
||||
> This function is WIP! It is not recomended to use
|
||||
{: .prompt-warning }
|
||||
|
||||
## Project Catagory
|
||||
Call stuff about projects.
|
||||
|
||||
### `macaronipm.project()['GetThumbnail']()`
|
||||
Calling this gives you the thumbnail of the project you set.
|
||||
|
||||
> Calling this will return a dataURI.
|
||||
{: .prompt-info }
|
||||
|
||||
### `macaronipm.project()['GetMeta']()`
|
||||
Calling this gives you metadata about the selected project.
|
||||
|
||||
Example:
|
||||
``` python
|
||||
print(macaronipm.project()['GetMeta']()['author']['username'])
|
||||
```
|
||||
|
||||
> `macaronipm.project()['GetMeta']()` outputs in json so you could do `macaronipm.project()['GetMeta']()['author']['username']`
|
||||
{: .prompt-tips }
|
||||
|
||||
## User catagory
|
||||
|
||||
### `macaronipm.user()['GetMeta']()`
|
||||
Calling this returns meta data about target user.
|
||||
|
||||
Example:
|
||||
``` python
|
||||
print(macaronipm.user()['GetMeta']("koffeejava"))
|
||||
```
|
||||
|
||||
> `macaronipm.user()['GetMeta']` outputs in json so you could do `macaronipm.user()['GetMeta']['koffeejava']`
|
||||
{: .prompt-tips }
|
||||
|
||||
### `macaronipm.user()['IsBlocking']()`
|
||||
Calling this returns meta data about target user.
|
||||
|
||||
Example:
|
||||
``` python
|
||||
if macaronipm.user()['IsBlocking']("koffeejava") == "true"
|
||||
print("Why did you block me :(")
|
||||
elif:
|
||||
print("Thats good!")
|
||||
```
|
||||
|
||||
> `macaronipm.user()['GetMeta']` outputs in json so you could do `macaronipm.user()['GetMeta']['koffeejava']`
|
||||
{: .prompt-tips }
|
||||
|
||||
### `macaronipm.user()['GetPfp']()`
|
||||
Calling this gives you the pfp of the target you set.
|
||||
|
||||
Example:
|
||||
``` python
|
||||
pfp = macaronipm.user()['GetPfp']("koffeejava")
|
||||
```
|
||||
|
||||
> Calling this will return a dataURI.
|
||||
{: .prompt-info }
|
||||
Reference in New Issue
Block a user