Limo
A simple mod manager
Loading...
Searching...
No Matches
file.h
Go to the documentation of this file.
1
5
6#pragma once
7
8#include <chrono>
9#include <json/json.h>
10#include <string>
11
12
16namespace nexus
17{
21class File
22{
23public:
29 File(const std::string& http_body);
35 File(const Json::Value& json_body);
37 File() = default;
38
40 long id_0;
42 long id_1;
44 long uid;
46 long file_id;
48 std::string name;
50 std::string version;
54 std::string category_name;
58 long size;
60 std::string file_name;
62 std::time_t uploaded_time;
64 std::string mod_version;
68 std::string description;
70 long size_kb;
74 std::string changelog_html;
77
78private:
84 void init(const Json::Value& json_body);
85};
86}
std::string version
The files version.
Definition file.h:50
long size
Size of the file in KibiBytes.
Definition file.h:58
File()=default
Default constructor.
long id_1
The id of the domain containing mod to which the file belongs.
Definition file.h:42
long file_id
The file id.
Definition file.h:46
File(const std::string &http_body)
Constructor. Initializes all members from the given http response body generated through an API reque...
Definition file.cpp:7
std::string content_preview_link
A URL of a NexusMods site showing a preview of the files contents.
Definition file.h:76
bool is_primary
Purpose unknown.
Definition file.h:56
long category_id
Id of the category to which the file belongs.
Definition file.h:52
std::string file_name
The files display name-.
Definition file.h:60
std::string category_name
Name of the category to which the file belongs, e.g. MAIN.
Definition file.h:54
long uid
Purpose unknown.
Definition file.h:44
long size_in_bytes
Size of the file in Bytes.
Definition file.h:72
std::string external_virus_scan_url
Optional: The URL of a virus scanning website (like virustotal.com) for this file.
Definition file.h:66
std::time_t uploaded_time
Timestamp for when the file was uploaded to NexusMods.
Definition file.h:62
std::string name
The name of the actual file on disk.
Definition file.h:48
std::string description
The description if the file.
Definition file.h:68
std::string changelog_html
The changelog if the file.
Definition file.h:74
void init(const Json::Value &json_body)
Initializes all members from the given http response body in json form generated through an API reque...
Definition file.cpp:23
long id_0
The file id.
Definition file.h:40
long size_kb
Size of the file in KibiBytes.
Definition file.h:70
std::string mod_version
Mod version to which the file belongs.
Definition file.h:64
The nexus namespace contains structs and functions needed for accessing the NexusMods API.
Definition api.h:18