You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was looking into integrating this into an Godot Engine project. Looking for advice for what longtail apis to call in c.
Questions:
What longtail api calls should be used
How do you make the web to local url transition
Suggest any features I can add to this longtail repo
Some ai generated designs
Here's how you might implement a custom protocol handler for longtail://v-sekai.org/1234EAF in your V-Sekai project without markdown headers.
First, you'll need to register your custom protocol handler. This is typically done at application startup. The exact method will depend on your programming language and framework, but here's an example in JavaScript using Electron:
Next, you'll need to implement the protocol handler. This function will be called whenever a URL with your custom protocol is accessed. It should parse the URL and perform the appropriate action, such as fetching data from a remote server or accessing a local file path.
Here's an example of how you might implement this in Node.js:
In this example, the hostname and pathname parts of the URL are combined to form a local file path. The path.normalize function is used to ensure that the path is correctly formatted for the current operating system.
Once the protocol handler is registered and implemented, you can use URLs with your custom protocol anywhere in your application. For example, you might use it to fetch game content like so:
fetch('longtail://v-sekai.org/1234EAF').then(response=>response.text()).then(content=>{// Do something with the content...})
Remember, the ability to nest folders in longtail depends on how you've implemented the protocol handler. If it interprets slashes (/) in the URL as directory separators, then it should be able to handle nested folders.
As for implementing this in Godot Engine 4.0 using GDScript, unfortunately, Godot does not currently support custom protocol handlers directly in GDScript. You would likely need to create a GDExtension plugin in C++ to handle this functionality.
The text was updated successfully, but these errors were encountered:
fire
changed the title
Recommended design for Integration for a Godot Engine addon
Recommended design for Integration for a Godot Engine
Aug 5, 2023
Hi,
I was looking into integrating this into an Godot Engine project. Looking for advice for what longtail apis to call in c.
Questions:
Some ai generated designs
Here's how you might implement a custom protocol handler for
longtail://v-sekai.org/1234EAF
in your V-Sekai project without markdown headers.First, you'll need to register your custom protocol handler. This is typically done at application startup. The exact method will depend on your programming language and framework, but here's an example in JavaScript using Electron:
Next, you'll need to implement the protocol handler. This function will be called whenever a URL with your custom protocol is accessed. It should parse the URL and perform the appropriate action, such as fetching data from a remote server or accessing a local file path.
Here's an example of how you might implement this in Node.js:
In this example, the
hostname
andpathname
parts of the URL are combined to form a local file path. Thepath.normalize
function is used to ensure that the path is correctly formatted for the current operating system.Once the protocol handler is registered and implemented, you can use URLs with your custom protocol anywhere in your application. For example, you might use it to fetch game content like so:
Remember, the ability to nest folders in longtail depends on how you've implemented the protocol handler. If it interprets slashes (
/
) in the URL as directory separators, then it should be able to handle nested folders.As for implementing this in Godot Engine 4.0 using GDScript, unfortunately, Godot does not currently support custom protocol handlers directly in GDScript. You would likely need to create a GDExtension plugin in C++ to handle this functionality.
The text was updated successfully, but these errors were encountered: