Pastebin Extension [FREE]

Hi App Kodular Community,

I’m excited to share with you a new extension I’ve developed – the Pastebin Extension! With this extension, you can easily create Pastebin pastes directly from your App Inventor projects.

Features:

  • Create Pastebin pastes programmatically.
  • Set paste options such as privacy, expiration date, and format.
  • Receive events for successful paste creation and error handling.

How to Use:

  1. Drag and drop the Pastebin Extension component into your project.
  2. Set your API key and other paste options using the provided blocks.
  3. Use the CreatePaste block to create a new paste.

Example Usage:

image

  1. Receive events for successful paste creation and error handling.

To further explain the CreatePaste method, this method is used to create a new paste on Pastebin. Pastebin is an online text-sharing platform that allows users to store and share code, text, or other information easily. In the CreatePaste method, there are several sockets to pay attention to:

  1. api_dev_key: This is the API key required for user authentication.
  2. api_paste_code: This is the text to be uploaded or shared.
  3. api_paste_private: Specifies the privacy level of the paste (public, unlisted, or private).
  4. api_paste_expire_date: Determines the expiration date of the paste.
  5. api_paste_format: Specifies the text format (e.g., “python” or “java”).

To obtain the API key, visit this link and follow the registration guide. Additionally, here’s a brief explanation of the paste privacy options:

  • Public: Visible to anyone.
  • Unlisted: Does not appear in search results but can be accessed if the direct link is known.
  • Private: Accessible only to the paste owner.

Options for api_paste_expire_date include various values like “10M,” indicating the expiration time in minutes.

It’s also important to note that the use of userKey is required in some cases, for example, to manage existing pastes.

Download:

com.rasitech.pastebin.aix (9.5 KB)

Feel free to try it out and let me know your thoughts. If you encounter any issues or have suggestions for improvements, please share them here### Write a short description

Add a picture of all the blocks

Write instructions to use your extension

Include a Download link here; can be direct or a link to your website/host

NOTE: Do not post a link to fishy websites.

5 Likes

Great job! but frankly, I didn’t understand why it was necessary at all :slight_smile: if I need to copy something, I can use the share block- from texts to images and choose any application where I need to send it.

1 Like