• Stars
    star
    131
  • Rank 266,565 (Top 6 %)
  • Language
    Scala
  • License
    MIT License
  • Created almost 10 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An eBay auction sniping service managed by a RESTful API

eBay Snipe Server

A simple eBay auction sniping service that provides a RESTful API for managing scheduled snipes.

It is written in Scala and makes use of the scala-scraper library for parsing content and interacting with eBay. Some concepts and ideas are inspired in JBidwatcher.

Quick Start

The quickest way to get the service up is to use Docker. An image is available on Docker Hub and can be started with the following command:

docker run -d -p 3647:3647 \
  -e 'EBAY_USERNAME=<your_username>' -e 'EBAY_PASSWORD=<your_password>' \
  ruippeixotog/ebay-snipe-server:0.2.2

The web service will be available on port 3647. You can also optionally mount the volumes /opt/docker/appdata containing persistent application state and /opt/docker/logs containing application logs:

docker run -d -p 3647:3647 \
  -e 'EBAY_USERNAME=<your_username>' -e 'EBAY_PASSWORD=<your_password>' \
  -v '<path_to_appdata_in_host>:/opt/docker/appdata' \
  -v '<path_to_logs_in_host>:/opt/docker/logs' \
  ruippeixotog/ebay-snipe-server:0.2.2

If you need to change the default configurations or fiddle with the source code, keep reading for instructions on how to build the project.

Building

The server has SBT as a build dependency. If you do not have it installed yet and you are using a Unix-based OS, I recommend using the sbt-extras script.

The server must be given the eBay credentials to be used for bidding on auctions. Create a src/main/resources/application.conf file with the following content:

ebay {
  username = "<your_username>"
  password = "<your_password>"
}

You can look at src/main/resources/reference.conf to check for additional server settings you can override.

You can start the server directly with SBT by running the SnipeServer main class. Alternatively, you can also create a self-contained package by running:

sbt universal:packageBin

A zip file will be created in target/universal. It can then be sent to any computer and run by extracting the archive and executing the extracted bin/ebay-snipe-server script. Only a JVM installation is required in the production machine.

API

All the successful responses returned by the server, as well as the entities accepted in POST and PUT requests, are JSON documents. POST and PUT requests must include a proper Content-Type: application/json header.

The server currently supports the following HTTP endpoints:

  • GET /auction/{auctionId}

Retrieves information about an auction from eBay.

  • GET /auction/{auctionId}/snipe

Returns information about the snipe currently scheduled for an auction.

  • POST /auction/{auctionId}/snipe

Submits information for a snipe to be scheduled for an auction. For scheduling a bid of 0.5 US dollars (the server's default currency), one can simply submit:

{
    "bid": 0.5
}

The request can also include the currency to use, a description, a specific time for the snipe to take place and the quantity of items to bid for. If a time is not provided, the server will schedule the snipe for a time it sees fit. The default quantity of items to bid for is 1. The full snipe JSON would be:

{
    "bid": "USD 0.5",
    "description": "cheap and awesome item",
    "quantity": 1,
    "snipeTime": "2014-08-05T02:29:06.690"
}
  • DELETE /auction/{auctionId}/snipe

Cancels a previously scheduled snipe for an auction.

  • GET /snipes

Returns all the currently scheduled snipes.

Copyright

Copyright (c) 2014 Rui Gonçalves. See LICENSE for details.

More Repositories

1

scala-scraper

A Scala library for scraping content from HTML pages
Scala
712
star
2

think-bayes-scala

A Scala library for Bayesian Inference and Probabilistic Programming
Scala
32
star
3

quicksort

Quicksort implemented by me in different languages
Idris
27
star
4

akka-stream-mon

Throughput and latency monitoring for Akka Streams
Scala
25
star
5

google-code-jam-2018

My solutions to Google Code Jam 2018 problems
C++
23
star
6

google-code-jam-2017

My solutions to Google Code Jam 2017 problems
C++
20
star
7

google-code-jam-2016

My solutions to Google Code Jam 2016 problems
C++
18
star
8

docker-google-musicmanager

Dockerfile for Google Music Manager
Shell
11
star
9

scalafbp

A Flow-based Programming engine written in Scala
Scala
8
star
10

akka-testkit-specs2

Specs2 specifications and matchers for akka-testkit
Scala
8
star
11

advent-of-code

My solutions to Advent of Code problems
C++
7
star
12

facebook-hacker-cup-2017

My solutions to Facebook Hacker Cup 2017 problems
C++
6
star
13

scala-typelevel-number-theory

A type level encoding of number theory atoms, axioms and rules
Scala
5
star
14

scala-to-text

A playground project for describing arbitrary Scala code in plain English
Scala
4
star
15

codeforces

My solutions to Codeforces problems
C++
4
star
16

sbt-classfinder

SBT plugin for retrieving runtime information about the classes and traits in a project
Scala
4
star
17

permission-explorer

An Android application that shows information about the permissions granted to applications.
Java
3
star
18

docker-spigot

Dockerfile for the Spigot Minecraft server
Dockerfile
3
star
19

facebook-hacker-cup-2016

My solutions to Facebook Hacker Cup 2016 problems
C++
3
star
20

algo-lib

Algorithms and data structures for algorithmic programming competitions
C++
3
star
21

chess-piece-collector

An utility for collecting training data for a chess board recognition ML system.
Java
3
star
22

uva

My solutions to UVa Online Judge problems
C++
3
star
23

botwars

A framework and server for competitions of game bots
JavaScript
2
star
24

facebook-hacker-cup-2018

My solutions to Facebook Hacker Cup 2018 problems
C++
2
star
25

facebook-hacker-cup-2013

My solutions to Facebook Hacker Cup 2013 problems
Java
2
star
26

intro-to-category-theory

A presentation about some basic concepts of category theory
CSS
2
star
27

joyful

A parser and interpreter for Joy written in Scala
Scala
2
star
28

docker-qstk

Dockerfile for QSTK
Shell
2
star
29

docker-mooshak

Dockerfile for Mooshak
Shell
2
star
30

streamscript

A stream-based programming language
TypeScript
2
star
31

algebra-of-programming

A summary of the concepts in Algebra Of Programming
2
star
32

google-code-jam-2015

My solutions to Google Code Jam 2015 problems
C++
1
star
33

google-code-jam-2019

My solutions to Google Code Jam 2019 problems
C++
1
star
34

type-driven-development-with-idris

My solutions to "Type-Driven Development with Idris" exercises
Idris
1
star
35

google-code-jam-2014

My solutions to Google Code Jam 2014 problems
C++
1
star
36

google-code-jam-2020

My solutions to Google Code Jam 2020 problems
C++
1
star
37

codechef

My solutions to CodeChef problems
C++
1
star
38

functional-brodal-queues

Implementation of a functional version of a Brodal queue in Scala
Scala
1
star