-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathResScript.cs
More file actions
178 lines (155 loc) · 3.68 KB
/
ResScript.cs
File metadata and controls
178 lines (155 loc) · 3.68 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
using System;
using System.Collections.Generic;
[Serializable]
public class Res
{
public List<Cats> cats = new List<Cats>();
public List<Ingredients> ingrediens = new List<Ingredients>();
public List<Dish> dish = new List<Dish>();
public List<Ingrediens_cat> ingrediens_cat = new List<Ingrediens_cat>();
public List<Company> company = new List<Company>();
public List<string> emails = new List<string>();
}
[Serializable]
public class Ingrediens_cat
{
public string name;
public string tid;
public List<Nid> nids = new List<Nid>();
}
[Serializable]
public class Nid
{
public string nid;
public string title;
public bool isON;
public bool repeat = false;
public int count=1;
public string img;
}
[Serializable]
public class Cats
{
public string tid;
public string name;
public bool selected = false;
public int count;
public int popCount;
public int newCount;
public int likedCount;
}
[Serializable]
public class Coords
{
public float lat;
public float lon;
}
[Serializable]
public class Ingredients
{
public string id;
public string name;
public string description;
public List <Img> img = new List<Img>();
}
[Serializable]
public class Company
{
public string id;
public string name;
public string description;
public string address;
public float lat;
public float lon;
public int rating;
public float distance;
}
[Serializable]
public class Dish
{
public bool showed=false;
public bool like;
public string id;
public string name;
public string cat;
public List<Img> img = new List<Img>();
public List<Cooking> cooking = new List<Cooking>();
public string description;
public List<Ing> ing = new List<Ing>();
public string kcal;
public string serving;
public string time;
public List<Reviews> reviews = new List<Reviews>();
public List<Pars> pars = new List<Pars>();
public string difficult;
public string kcal100gr;
public bool newest;
public string dish_url;
public bool GetParsContains(string val)
{
foreach(var item in pars)
{
if (item.value == val)
return true;
}
return false;
}
}
[Serializable]
public class Pars
{
public string value;
}
[Serializable]
public class Reviews
{
public string subject;
public string text;
public string rating;
public string uid;
public string name;
public string surname;
public string url;
public string review_id;
public string review_rating;
public string review_text;
public string review_user_name;
public Reviews(string _subject, string _review_id, string _review_rating,
string _review_text, string _name, string _surname, string _url, string _review_user_name)
{
this.subject = _subject;
this.review_id = _review_id;
this.review_rating = _review_rating;
this.review_text = _review_text;
this.name = _name;
this.surname = _surname;
this.url = _url;
this.review_user_name = _review_user_name;
}
public Reviews() { }
}
[Serializable]
public class Cooking
{
public string target_id;
public string alt;
public string title;
public string url;
}
[Serializable]
public class Description
{
}
[Serializable]
public class Ing
{
public string target_id;
}
[Serializable]
public class Img
{
public string target_id;
public string alt;
public string title;
public string url;
}