Skip to content

Latest commit

 

History

History
127 lines (98 loc) · 3.15 KB

Helpers.md

File metadata and controls

127 lines (98 loc) · 3.15 KB

Amino.helpers

This is a seperated documentation file written for the Amino.helpers class!

  • This file might not always be up to date right away
  • This file contains every Amino.helpers function / method nicely wrapped up
  • To see the full general documentation consider reading Readme.md (Click here)
Amino.helpers

The helpers class is an important part of Amino.Net and any other Amino library, as it allows you to get around the Amino API more easily

Values:

  • BaseURL : string : This string represents the base URL to Aminos REST API
generate_device_id()

This function allows you to generate an Amino ready device ID

Required Values:

  • None

Example:

Console.WriteLine("Amino device ID: " + Amino.helpers.generate_device_id());

Returns:

  • string
generate_signiture(sring data)

This function allows you to generate an Amino valid request signiture

Required Values:

  • data : string : The data you want to turn into a signiture hash

Example:

Console.WriteLine("Amino Signiture: " + Amino.helpers.generate_signiture("{ some JSON data }"));

Returns:

  • string
generate_file_signiture(byte[] data)

This function allows you to generate an Amino valid request signiture out of file data

Required Values:

  • data : byte[] : The file bytes that you want to turn into data

Example:

Console.WriteLine("Some file signiture: " + Amino.helpers.generate_file_signiture(File.ReadAllBytes("Some_File_Path")));

Returns:

  • string
GetTimestamp()

This function allows you to get the current UNIX timestamp, it is **not** Amino ready!

Required Values:

  • None

Example:

Console.WriteLine("Current UNIX Timestamp: " + Amino.helpers.GetTimestamp());
Console.WriteLine("Current UNIX Timestamp (Amino ready): " + Amino.helpers.GetTimestamp() * 1000);

Returns:

  • double
get_ObjectTypeID(Amino.Types.Object_Types type)

This function allows you to convert a Type into the fitting Amino object ID

Required Values:

  • type : Amino.Types.Object_Types : The Type enum that you want to convert into a number

Example:

Console.WriteLine("The Amino ID for Blog posts is: " + Amino.helpers.get_ObjectTypeID(Types.Object_Types.Blog));

Returns:

  • int