Truxton url create
Jump to navigation
Jump to search
This creates an object you can use to record a website visit in Truxton.
This adds records to the [WebsiteVisit] table.
Syntax
uint64_t truxton_url_create(uint64_t truxton_handle);
Parameters
truxton_handle
The Truxton instance this URL will belong.
This handle comes from calling truxton_create().
Return value
A handle to a URL object.
Sample
void add_home_url( uint64_t truxton, uint64_t media, uint64_t child_file, char const * url, uint64_t when )
{
char media_id[ 65 ];
char file_id[ 65 ];
truxton_media_get_id( media, media_id, sizeof( media_id ) );
truxton_child_file_get_id( child_file, file_id, sizeof( file_id ) );
uint64_t url = truxton_url_create( truxton );
truxton_url_set_account( url, "admin" );
truxton_url_set_account_offset( url, -1 );
truxton_url_set_file_id( url, file_id );
truxton_url_set_media_id( url, media_id );
truxton_url_set_format( url,
// Commit the data to the database
truxton_url_save( url );
truxton_url_destroy( url );
}