-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathitem-listings.proto
74 lines (59 loc) · 1.47 KB
/
item-listings.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
syntax = "proto3";
package item_prices;
import "google/api/annotations.proto";
import "google/protobuf/timestamp.proto";
import "protoc-gen-openapiv2/options/annotations.proto";
option go_package = "./item-prices";
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
info: {
version: "1.0";
};
schemes: [HTTP, HTTPS];
};
message ItemListing {
string hash_name = 1;
string market_id = 2;
double float_value = 3;
int32 price = 4;
}
message ShortItemListing {
string market_id = 1;
double float_value = 2;
int32 price = 3;
}
message ItemListings {
string hash_name = 1;
repeated ShortItemListing listings = 2;
}
message GetListingsRequest {
string hash_name = 1;
}
message GetListingsResponse {
ItemListings listings = 1;
}
message GetAllListingsRequest {}
message GetAllListingsResponse {
repeated ItemListings all_listings = 1;
}
message DeleteItemsRequest {
repeated ItemListing listings = 1;
}
message DeleteItemsResponse {}
service ListingsService {
rpc GetListings(GetListingsRequest) returns (GetListingsResponse) {
option (google.api.http) = {
get: "/api/get_listings/{hash_name}"
};
}
rpc GetAllListings(GetAllListingsRequest) returns (GetAllListingsResponse) {
option (google.api.http) = {
get: "/api/get_all_listings"
};
}
rpc DeleteItems(DeleteItemsRequest) returns (DeleteItemsResponse) {
option (google.api.http) = {
post: "/api/delete_items"
body: "*"
};
}
}