{"id":25269946,"url":"https://github.com/aymenjd/td-vala","last_synced_at":"2026-02-27T12:08:52.108Z","repository":{"id":144546982,"uuid":"594490107","full_name":"AYMENJD/td-vala","owner":"AYMENJD","description":"TDLib json interface (tdjson) for vala.","archived":false,"fork":false,"pushed_at":"2024-07-11T13:31:02.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T11:37:42.720Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Vala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AYMENJD.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-28T17:58:42.000Z","updated_at":"2024-07-11T13:31:06.000Z","dependencies_parsed_at":"2025-02-12T11:37:59.871Z","dependency_job_id":"23f30c50-164a-48e7-bc5c-d90885c190bb","html_url":"https://github.com/AYMENJD/td-vala","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AYMENJD%2Ftd-vala","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AYMENJD%2Ftd-vala/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AYMENJD%2Ftd-vala/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AYMENJD%2Ftd-vala/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AYMENJD","download_url":"https://codeload.github.com/AYMENJD/td-vala/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441060,"owners_count":20939239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-12T11:28:03.135Z","updated_at":"2026-02-27T12:08:44.407Z","avatar_url":"https://github.com/AYMENJD.png","language":"Vala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TDLib vala\n[TDLib](https://github.com/tdlib/td) json interface (tdjson) for vala. \n\n## Using tdjson in vala\nFirst you must [build TDLib](https://github.com/tdlib/td#building) on your machine. \n\nThen you need to link `libtdjson.so` shared library with your vala app/file.\n\n### Example\nHere is an example code of using TDJson in vala:\n```vala\npublic static void log_callback(int log_level, string message){\n    print(\"LOG: \"+ message);\n}\n\nvoid main () {\n    // We need a client id (aka instance id) to deal with TDLib. \n    int client_id = TDJsonApi.create_client_id();\n\n    //  Disable default TDLib log stream\n    string setLogResult = TDJsonApi.execute(\"{\\\"@type\\\": \\\"setLogStream\\\", \\\"log_stream\\\": {\\\"@type\\\": \\\"logStreamEmpty\\\"}}\");\n    print(setLogResult);\n    print(\"\\n\");\n\n    //  Set log callback \n    TDJsonApi.set_log_message_callback(1024, (TDJsonApi.log_message_callback_ptr) log_callback);\n\n    //  Set TDLib log verbosity level to 1023 (log everything)\n    TDJsonApi.execute(\"{\\\"@type\\\": \\\"setLogVerbosityLevel\\\", \\\"new_verbosity_level\\\": 1023}\");\n    \n    TDJsonApi.send(client_id, \"{\\\"@type\\\": \\\"getOption\\\", \\\"name\\\": \\\"version\\\"\");\n    print(TDJsonApi.receive(10));\n}\n```\n\n#### Build example\n\u003e By default [TDLib build instructions](https://tdlib.github.io/td/build.html) installs TDLib in `td/tdlib`.\n\nUsing `valac`:\n- If TDLib is installed on your home directory:\n    ```bash\n    export TDLIB_PATH=$HOME/td/tdlib\n    export LD_LIBRARY_PATH=$TDLIB_PATH/lib\n    valac --vapidir . --pkg tdjson -X -L$LD_LIBRARY_PATH -X -ltdjson -X -I$TDLIB_PATH/include example.vala\n    ```\n\n- If TDLib is installed in `/usr/local` (recommended):\n    ```bash\n    valac --vapidir . --pkg tdjson -X -ltdjson example.vala\n    ```\n\n##### Run\n```bash\n./example\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faymenjd%2Ftd-vala","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faymenjd%2Ftd-vala","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faymenjd%2Ftd-vala/lists"}