Examples¶
Uploading a Image to sxcu.net¶
To upload an image foo.png located in the same directory as the script and print the url:
import sxcu
connector = sxcu.SXCU()
result = connector.upload_image("foo.png")
print(result["url"])
Parameters acceped are
|
This uploads image to sxcu |
Uploading Image with og_properties
¶
What is og_properties
?¶
The Open Graph protocol The Open Graph protocol enables any web page to become a rich object in a social graph.
sxcu.net allows the following properties to be changed for changing the way it embed in apps and websites.
How to use it?¶
Using the class
A small example using this can be
import sxcu
connector = sxcu.SXCU()
props = sxcu.og_properties(color="#000",description="some random post",title="I love SXCU")
result = connector.upload_image("foo.png")
print(result["url"])
Creating a Short Link¶
The reference for it is
|
Creates a new link. |
A small example illustrating it can be.
import sxcu
connector = sxcu.SXCU()
result = connector.create_link("https://sxcu.syrusdark.website")
print(result["url"])
should print a shortened URL.