https://gist.github.com/Vortire/5583ff0 ... 71c833ba5c
Documentation:
Code: Select all
##############################################################
#
# NFO2 API C# - Vortire.com - 2021
#
# "//" or "#" at the beginning of a line signifies a comment.
#
# You can create profiles, instructions, send GET and POST
# requests as shown below.
#
# By default, this introduction will send a GET request
# using "profile1" to the current events page of NFO.
#
#
# To call this API using this test syntax, create a text
# file called "test.txt" and call the NFO2 API like so:
#
# string[] x = NFO2.Parse(File.ReadAllText("test.txt"));
# foreach(string y in x) { Console.WriteLine(y); }
#
##############################################################
// Ensure we let the parser know we are using " -> " instead of "->"
{{spaced-seperators}}
// Create new profile
Create_Profile -> Named:profile1 -> WithEmail:example@example.com -> WithPassword:example -> WithServiceName:exampleservice
// Send GET request
Send_Get -> To:https://www.nfoservers.com/control/events.pl -> WithProfile:profile1 -> SetResultTo:currentserverstatus
# Uncomment below lines to perform POST requests
// Creating the instruction to shutdown a server
// Create_Instruction -> Named:shutd -> WithData:%shutdown%
// Requesting server shutdown
// Send_Post -> To:example.pl -> WithProfile:profile1 -> WithInstruction:shutd