Added files
This commit is contained in:
parent
00518f628b
commit
c20536084b
6 changed files with 196 additions and 2 deletions
24
src/main.zig
Normal file
24
src/main.zig
Normal file
|
@ -0,0 +1,24 @@
|
|||
const std = @import("std");
|
||||
const url = @import("url.zig");
|
||||
const json = @import("json.zig");
|
||||
const dbg_print = std.debug.print;
|
||||
|
||||
pub fn main() !void {
|
||||
// gpa allocator
|
||||
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
|
||||
defer _ = gpa.deinit();
|
||||
const allocator = gpa.allocator();
|
||||
|
||||
var args = try std.process.argsWithAllocator(allocator);
|
||||
defer args.deinit();
|
||||
|
||||
while (args.next()) |arg| {
|
||||
dbg_print("{s}", .{arg});
|
||||
}
|
||||
|
||||
const data = try url.fetch(allocator, "https://tidal.401658.xyz/track/?id=286266927&quality=LOSSLESS");
|
||||
defer allocator.free(data);
|
||||
|
||||
try json.extract(allocator, data);
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue