Skip to content

Commit

Permalink
Sample code for getting user's profile and listings, package update
Browse files Browse the repository at this point in the history
  • Loading branch information
baonguyenly committed Jul 10, 2018
1 parent 06f4de5 commit 9c08686
Show file tree
Hide file tree
Showing 18 changed files with 655 additions and 260 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -7,6 +7,7 @@ Node.js API bindings and sample code create Gameflip listings for Steam items
* [Steam Bulk Listing](https://gameflip.github.io/gfapi/samples/bulk_listing.html)
* [Rocket League Listing](https://gameflip.github.io/gfapi/samples/rl_listing.html)
* [Search Listing](https://gameflip.github.io/gfapi/samples/search_listing.html)
* [My Listings](https://gameflip.github.io/gfapi/samples/my_listings.html)

### API Key and OTP secret

Expand Down
90 changes: 0 additions & 90 deletions docs/Listing.md
Expand Up @@ -233,96 +233,6 @@ Content-Type: application/json
```


### GET /api/v1/listing/mine

Returns all listings for the current user. Limited sorting and filtering features.
Results are always sorted by `created` time in descending order.
Filtering by `status` is optional.

**sample request**

```http
GET /api/v1/listing/mine HTTP/1.1
```

**sample response**

```http
HTTP/1.1 200 OK
Content-Length: 977
Content-Type: application/json
{
"status": "SUCCESS",
"data": [
{
"id": "d9989763-14b3-464a-b629-7ad42c65c4c7",
"description": "Down-sized heuristic utilisation",
"owner": "us-fake-1:e793dd9c-d443-4080-9dc9-4220f910170f",
"name": "Dwarf Fortress",
"platform": "PS4",
"price": 1704,
"status": "onsale",
"expire_in_days": 7,
"commission": 307,
"created": "2015-04-24T02:01:03.228Z",
"updated": "2015-04-24T02:01:03.228Z",
"expiration": "2015-05-01T02:01:03.228Z",
"version": "0"
},
{
"id": "2912456b-4ec9-428a-b2d0-bfe9b6a8de87",
"description": "Reduced interactive pricing structure",
"owner": "us-fake-1:e793dd9c-d443-4080-9dc9-4220f910170f",
"name": "Orc Den",
"platform": "Wii U",
"price": 3817,
"status": "draft",
"expire_in_days": 12,
"commission": 687,
"created": "2015-04-24T02:01:03.288Z",
"updated": "2015-04-24T02:01:03.288Z",
"version": "0"
}
]
}
```
**sample request**

```http
GET /api/v1/listing/mine?status=onsale HTTP/1.1
```

**sample response**

```http
HTTP/1.1 200 OK
Content-Length: 533
Content-Type: application/json
{
"status": "SUCCESS",
"data": [
{
"id": "d9989763-14b3-464a-b629-7ad42c65c4c7",
"description": "Down-sized heuristic utilisation",
"owner": "us-fake-1:e793dd9c-d443-4080-9dc9-4220f910170f",
"name": "Dwarf Fortress",
"platform": "PS4",
"price": 1704,
"status": "onsale",
"expire_in_days": 7,
"commission": 307,
"created": "2015-04-24T02:01:03.228Z",
"updated": "2015-04-24T02:01:03.228Z",
"expiration": "2015-05-01T02:01:03.228Z",
"version": "0"
}
]
}
```


### POST /api/v1/listing
Create a new listing and return the new listing object. The POST body may contain an optional json document of the new listing to
be created.
Expand Down
52 changes: 49 additions & 3 deletions docs/Profile.md
@@ -1,8 +1,54 @@
## Service: Profile

Service | Method | Documentation
---------------------------|--------|--------------
/api/v1/account/me/profile | GET | [GET /api/v1/account/me/profile](#get-apiv1accountmeprofile)
Service | Method | Documentation
----------------------------|--------|--------------
/api/v1/account/:id/profile | GET | [GET /api/v1/account/:id/profile](#get-apiv1accountidprofile)
/api/v1/account/me/profile | GET | [GET /api/v1/account/me/profile](#get-apiv1accountmeprofile)

### GET /api/v1/account/:id/profile

Get public profile of specified user id. If user id is "me", get the full profile (public and private)
of current logged in user.

**sample request**

```http
GET /api/v1/account/6209aa43-0a27-4bf8-930e-ab00ab11c7fa/profile HTTP/1.1
```

**sample response**

```http
HTTP/1.1 200 OK
Content-Type: application/json
{
"status": "SUCCESS",
"data": {
"owner": "us-east-1:6209aa43-0a27-4bf8-930e-ab00ab11c7fa",
"display_name": "joker",
"first_name": "Jack",
"last_name": "Napier",
"about": "Criminal mastermind",
"avatar": "http://fc00.deviantart.net/fs71/f/2012/208/f/a/joker_painting_by_scampicrevette-d58soyl.jpg",
"background": "http://vignette4.wikia.nocookie.net/batman/images/c/c1/AA.jpg/revision/latest?cb=20130218152233",
"rating_good": 5,
"rating_neutral": 1,
"rating_poor": 3,
"score": 2,
"notification_prefs": {
"account": ["app", "push", "email", "sms"],
"transactional": ["app", "push", "email", "sms"],
"community": ["app", "push"],
"following": ["app", "push", "email"]
},
"id_verified": "2015-04-16T18:37:57.660Z",
"created": "2015-04-16T18:37:57.580Z",
"updated": "2015-04-16T18:37:57.660Z",
"version": "1"
}
}
```

### GET /api/v1/account/me/profile

Expand Down

1 comment on commit 9c08686

@Timmy17x
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question , I a newb and want to make something to post items that i craft on fortnite easy any suggestions

Please sign in to comment.