Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Auctions
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Wilcox Technologies
Auctions
Commits
68cdb4bd
Commit
68cdb4bd
authored
Jul 19, 2012
by
A. Wilcox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Etsy: Add [tag|material]Count to get count of tags/materials that an item has.
parent
265b29a6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
Common/Models/EtsyItem.cpp
Common/Models/EtsyItem.cpp
+12
-0
Common/Models/EtsyItem.h
Common/Models/EtsyItem.h
+3
-0
No files found.
Common/Models/EtsyItem.cpp
View file @
68cdb4bd
...
...
@@ -236,6 +236,12 @@ libAPI vector<const char *> *EtsyItem::getTags(void)
}
libAPI
size_t
EtsyItem
::
tagCount
()
{
return
this
->
_tags
.
size
();
}
libAPI
vector
<
const
char
*>
*
EtsyItem
::
getMaterials
(
void
)
{
vector
<
const
char
*>
*
materials
=
new
vector
<
const
char
*>
;
...
...
@@ -247,6 +253,12 @@ libAPI vector<const char *> *EtsyItem::getMaterials(void)
}
libAPI
size_t
EtsyItem
::
materialCount
()
{
return
this
->
_materials
.
size
();
}
void
EtsyItem
::
loadTagsFromJSON
(
JSONNode
tags
)
{
for
(
unsigned
long
next_tag
=
0
;
next_tag
<
this
->
_tags
.
size
();
next_tag
++
)
...
...
Common/Models/EtsyItem.h
View file @
68cdb4bd
...
...
@@ -56,6 +56,9 @@ public:
libAPI
vector
<
const
char
*>
*
getTags
(
void
);
libAPI
vector
<
const
char
*>
*
getMaterials
(
void
);
libAPI
size_t
materialCount
(
void
);
libAPI
size_t
tagCount
(
void
);
private:
/*!
@brief Initialise an Etsy item from Etsy JSON.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment