btce 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/lib/btce.rb CHANGED
@@ -1,4 +1,6 @@
1
- # Copyright (c) 2013, Christopher Mark Gore,
1
+ # -*- coding: utf-8 -*-
2
+
3
+ # Copyright © 2013-2014, Christopher Mark Gore,
2
4
  # Soli Deo Gloria,
3
5
  # All rights reserved.
4
6
  #
@@ -9,16 +11,16 @@
9
11
  # Redistribution and use in source and binary forms, with or without
10
12
  # modification, are permitted provided that the following conditions are met:
11
13
  #
12
- # * Redistributions of source code must retain the above copyright
13
- # notice, this list of conditions and the following disclaimer.
14
+ # * Redistributions of source code must retain the above copyright
15
+ # notice, this list of conditions and the following disclaimer.
14
16
  #
15
- # * Redistributions in binary form must reproduce the above copyright
16
- # notice, this list of conditions and the following disclaimer in the
17
- # documentation and/or other materials provided with the distribution.
17
+ # * Redistributions in binary form must reproduce the above copyright
18
+ # notice, this list of conditions and the following disclaimer in the
19
+ # documentation and/or other materials provided with the distribution.
18
20
  #
19
- # * Neither the name of Christopher Mark Gore nor the names of other
20
- # contributors may be used to endorse or promote products derived from
21
- # this software without specific prior written permission.
21
+ # * Neither the name of Christopher Mark Gore nor the names of other
22
+ # contributors may be used to endorse or promote products derived from
23
+ # this software without specific prior written permission.
22
24
  #
23
25
  # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24
26
  # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
data/lib/btce/api.rb CHANGED
@@ -1,4 +1,6 @@
1
- # Copyright (c) 2013, Christopher Mark Gore,
1
+ # -*- coding: utf-8 -*-
2
+
3
+ # Copyright © 2013-2014, Christopher Mark Gore,
2
4
  # Soli Deo Gloria,
3
5
  # All rights reserved.
4
6
  #
@@ -9,16 +11,16 @@
9
11
  # Redistribution and use in source and binary forms, with or without
10
12
  # modification, are permitted provided that the following conditions are met:
11
13
  #
12
- # * Redistributions of source code must retain the above copyright
13
- # notice, this list of conditions and the following disclaimer.
14
+ # * Redistributions of source code must retain the above copyright
15
+ # notice, this list of conditions and the following disclaimer.
14
16
  #
15
- # * Redistributions in binary form must reproduce the above copyright
16
- # notice, this list of conditions and the following disclaimer in the
17
- # documentation and/or other materials provided with the distribution.
17
+ # * Redistributions in binary form must reproduce the above copyright
18
+ # notice, this list of conditions and the following disclaimer in the
19
+ # documentation and/or other materials provided with the distribution.
18
20
  #
19
- # * Neither the name of Christopher Mark Gore nor the names of other
20
- # contributors may be used to endorse or promote products derived from
21
- # this software without specific prior written permission.
21
+ # * Neither the name of Christopher Mark Gore nor the names of other
22
+ # contributors may be used to endorse or promote products derived from
23
+ # this software without specific prior written permission.
22
24
  #
23
25
  # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24
26
  # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -1,4 +1,6 @@
1
- # Copyright (c) 2013, Christopher Mark Gore,
1
+ # -*- coding: utf-8 -*-
2
+
3
+ # Copyright © 2013-2014, Christopher Mark Gore,
2
4
  # Soli Deo Gloria,
3
5
  # All rights reserved.
4
6
  #
@@ -9,16 +11,16 @@
9
11
  # Redistribution and use in source and binary forms, with or without
10
12
  # modification, are permitted provided that the following conditions are met:
11
13
  #
12
- # * Redistributions of source code must retain the above copyright
13
- # notice, this list of conditions and the following disclaimer.
14
+ # * Redistributions of source code must retain the above copyright
15
+ # notice, this list of conditions and the following disclaimer.
14
16
  #
15
- # * Redistributions in binary form must reproduce the above copyright
16
- # notice, this list of conditions and the following disclaimer in the
17
- # documentation and/or other materials provided with the distribution.
17
+ # * Redistributions in binary form must reproduce the above copyright
18
+ # notice, this list of conditions and the following disclaimer in the
19
+ # documentation and/or other materials provided with the distribution.
18
20
  #
19
- # * Neither the name of Christopher Mark Gore nor the names of other
20
- # contributors may be used to endorse or promote products derived from
21
- # this software without specific prior written permission.
21
+ # * Neither the name of Christopher Mark Gore nor the names of other
22
+ # contributors may be used to endorse or promote products derived from
23
+ # this software without specific prior written permission.
22
24
  #
23
25
  # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24
26
  # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -1,4 +1,6 @@
1
- # Copyright (c) 2013, Christopher Mark Gore,
1
+ # -*- coding: utf-8 -*-
2
+
3
+ # Copyright © 2013-2014, Christopher Mark Gore,
2
4
  # Soli Deo Gloria,
3
5
  # All rights reserved.
4
6
  #
@@ -9,16 +11,16 @@
9
11
  # Redistribution and use in source and binary forms, with or without
10
12
  # modification, are permitted provided that the following conditions are met:
11
13
  #
12
- # * Redistributions of source code must retain the above copyright
13
- # notice, this list of conditions and the following disclaimer.
14
+ # * Redistributions of source code must retain the above copyright
15
+ # notice, this list of conditions and the following disclaimer.
14
16
  #
15
- # * Redistributions in binary form must reproduce the above copyright
16
- # notice, this list of conditions and the following disclaimer in the
17
- # documentation and/or other materials provided with the distribution.
17
+ # * Redistributions in binary form must reproduce the above copyright
18
+ # notice, this list of conditions and the following disclaimer in the
19
+ # documentation and/or other materials provided with the distribution.
18
20
  #
19
- # * Neither the name of Christopher Mark Gore nor the names of other
20
- # contributors may be used to endorse or promote products derived from
21
- # this software without specific prior written permission.
21
+ # * Neither the name of Christopher Mark Gore nor the names of other
22
+ # contributors may be used to endorse or promote products derived from
23
+ # this software without specific prior written permission.
22
24
  #
23
25
  # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24
26
  # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -1,4 +1,6 @@
1
- # Copyright (c) 2013, Christopher Mark Gore,
1
+ # -*- coding: utf-8 -*-
2
+
3
+ # Copyright © 2013-2014, Christopher Mark Gore,
2
4
  # Soli Deo Gloria,
3
5
  # All rights reserved.
4
6
  #
@@ -9,16 +11,16 @@
9
11
  # Redistribution and use in source and binary forms, with or without
10
12
  # modification, are permitted provided that the following conditions are met:
11
13
  #
12
- # * Redistributions of source code must retain the above copyright
13
- # notice, this list of conditions and the following disclaimer.
14
+ # * Redistributions of source code must retain the above copyright
15
+ # notice, this list of conditions and the following disclaimer.
14
16
  #
15
- # * Redistributions in binary form must reproduce the above copyright
16
- # notice, this list of conditions and the following disclaimer in the
17
- # documentation and/or other materials provided with the distribution.
17
+ # * Redistributions in binary form must reproduce the above copyright
18
+ # notice, this list of conditions and the following disclaimer in the
19
+ # documentation and/or other materials provided with the distribution.
18
20
  #
19
- # * Neither the name of Christopher Mark Gore nor the names of other
20
- # contributors may be used to endorse or promote products derived from
21
- # this software without specific prior written permission.
21
+ # * Neither the name of Christopher Mark Gore nor the names of other
22
+ # contributors may be used to endorse or promote products derived from
23
+ # this software without specific prior written permission.
22
24
  #
23
25
  # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24
26
  # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -1,4 +1,6 @@
1
- # Copyright (c) 2013, Christopher Mark Gore,
1
+ # -*- coding: utf-8 -*-
2
+
3
+ # Copyright © 2013-2014, Christopher Mark Gore,
2
4
  # Soli Deo Gloria,
3
5
  # All rights reserved.
4
6
  #
@@ -9,16 +11,16 @@
9
11
  # Redistribution and use in source and binary forms, with or without
10
12
  # modification, are permitted provided that the following conditions are met:
11
13
  #
12
- # * Redistributions of source code must retain the above copyright
13
- # notice, this list of conditions and the following disclaimer.
14
+ # * Redistributions of source code must retain the above copyright
15
+ # notice, this list of conditions and the following disclaimer.
14
16
  #
15
- # * Redistributions in binary form must reproduce the above copyright
16
- # notice, this list of conditions and the following disclaimer in the
17
- # documentation and/or other materials provided with the distribution.
17
+ # * Redistributions in binary form must reproduce the above copyright
18
+ # notice, this list of conditions and the following disclaimer in the
19
+ # documentation and/or other materials provided with the distribution.
18
20
  #
19
- # * Neither the name of Christopher Mark Gore nor the names of other
20
- # contributors may be used to endorse or promote products derived from
21
- # this software without specific prior written permission.
21
+ # * Neither the name of Christopher Mark Gore nor the names of other
22
+ # contributors may be used to endorse or promote products derived from
23
+ # this software without specific prior written permission.
22
24
  #
23
25
  # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24
26
  # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -34,16 +36,17 @@
34
36
 
35
37
  module Btce
36
38
  class PublicOperation
37
- attr_reader :json, :operation, :pair
39
+ attr_reader :json, :operation, :pair, :options
38
40
 
39
- def initialize(operation, pair)
41
+ def initialize(operation, pair, options = {})
40
42
  @operation = operation
41
43
  @pair = pair
44
+ @options = options
42
45
  load_json
43
46
  end
44
47
 
45
48
  def load_json
46
- @json = PublicAPI.get_pair_operation_json pair, operation
49
+ @json = PublicAPI.get_pair_operation_json pair, operation, options
47
50
  end
48
51
  end
49
52
  end
@@ -1,4 +1,6 @@
1
- # Copyright (c) 2013-2014, Christopher Mark Gore,
1
+ # -*- coding: utf-8 -*-
2
+
3
+ # Copyright © 2013-2014, Christopher Mark Gore,
2
4
  # Soli Deo Gloria,
3
5
  # All rights reserved.
4
6
  #
@@ -9,16 +11,16 @@
9
11
  # Redistribution and use in source and binary forms, with or without
10
12
  # modification, are permitted provided that the following conditions are met:
11
13
  #
12
- # * Redistributions of source code must retain the above copyright
13
- # notice, this list of conditions and the following disclaimer.
14
+ # * Redistributions of source code must retain the above copyright
15
+ # notice, this list of conditions and the following disclaimer.
14
16
  #
15
- # * Redistributions in binary form must reproduce the above copyright
16
- # notice, this list of conditions and the following disclaimer in the
17
- # documentation and/or other materials provided with the distribution.
17
+ # * Redistributions in binary form must reproduce the above copyright
18
+ # notice, this list of conditions and the following disclaimer in the
19
+ # documentation and/or other materials provided with the distribution.
18
20
  #
19
- # * Neither the name of Christopher Mark Gore nor the names of other
20
- # contributors may be used to endorse or promote products derived from
21
- # this software without specific prior written permission.
21
+ # * Neither the name of Christopher Mark Gore nor the names of other
22
+ # contributors may be used to endorse or promote products derived from
23
+ # this software without specific prior written permission.
22
24
  #
23
25
  # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24
26
  # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -1,4 +1,6 @@
1
- # Copyright (c) 2013, Christopher Mark Gore,
1
+ # -*- coding: utf-8 -*-
2
+
3
+ # Copyright © 2013-2014, Christopher Mark Gore,
2
4
  # Soli Deo Gloria,
3
5
  # All rights reserved.
4
6
  #
@@ -9,16 +11,16 @@
9
11
  # Redistribution and use in source and binary forms, with or without
10
12
  # modification, are permitted provided that the following conditions are met:
11
13
  #
12
- # * Redistributions of source code must retain the above copyright
13
- # notice, this list of conditions and the following disclaimer.
14
+ # * Redistributions of source code must retain the above copyright
15
+ # notice, this list of conditions and the following disclaimer.
14
16
  #
15
- # * Redistributions in binary form must reproduce the above copyright
16
- # notice, this list of conditions and the following disclaimer in the
17
- # documentation and/or other materials provided with the distribution.
17
+ # * Redistributions in binary form must reproduce the above copyright
18
+ # notice, this list of conditions and the following disclaimer in the
19
+ # documentation and/or other materials provided with the distribution.
18
20
  #
19
- # * Neither the name of Christopher Mark Gore nor the names of other
20
- # contributors may be used to endorse or promote products derived from
21
- # this software without specific prior written permission.
21
+ # * Neither the name of Christopher Mark Gore nor the names of other
22
+ # contributors may be used to endorse or promote products derived from
23
+ # this software without specific prior written permission.
22
24
  #
23
25
  # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24
26
  # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -36,8 +38,8 @@ module Btce
36
38
  class Trades < PublicOperation
37
39
  attr_reader :all
38
40
 
39
- def initialize(pair)
40
- super 'trades', pair
41
+ def initialize(pair, options={})
42
+ super 'trades', pair, options
41
43
  load_trades
42
44
  end
43
45
 
@@ -1,4 +1,6 @@
1
- # Copyright (c) 2013, Christopher Mark Gore,
1
+ # -*- coding: utf-8 -*-
2
+
3
+ # Copyright © 2013-2014, Christopher Mark Gore,
2
4
  # Soli Deo Gloria,
3
5
  # All rights reserved.
4
6
  #
@@ -9,16 +11,16 @@
9
11
  # Redistribution and use in source and binary forms, with or without
10
12
  # modification, are permitted provided that the following conditions are met:
11
13
  #
12
- # * Redistributions of source code must retain the above copyright
13
- # notice, this list of conditions and the following disclaimer.
14
+ # * Redistributions of source code must retain the above copyright
15
+ # notice, this list of conditions and the following disclaimer.
14
16
  #
15
- # * Redistributions in binary form must reproduce the above copyright
16
- # notice, this list of conditions and the following disclaimer in the
17
- # documentation and/or other materials provided with the distribution.
17
+ # * Redistributions in binary form must reproduce the above copyright
18
+ # notice, this list of conditions and the following disclaimer in the
19
+ # documentation and/or other materials provided with the distribution.
18
20
  #
19
- # * Neither the name of Christopher Mark Gore nor the names of other
20
- # contributors may be used to endorse or promote products derived from
21
- # this software without specific prior written permission.
21
+ # * Neither the name of Christopher Mark Gore nor the names of other
22
+ # contributors may be used to endorse or promote products derived from
23
+ # this software without specific prior written permission.
22
24
  #
23
25
  # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24
26
  # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
data/lib/btce/trade.rb CHANGED
@@ -1,4 +1,6 @@
1
- # Copyright (c) 2013, Christopher Mark Gore,
1
+ # -*- coding: utf-8 -*-
2
+
3
+ # Copyright © 2013-2014, Christopher Mark Gore,
2
4
  # Soli Deo Gloria,
3
5
  # All rights reserved.
4
6
  #
@@ -9,16 +11,16 @@
9
11
  # Redistribution and use in source and binary forms, with or without
10
12
  # modification, are permitted provided that the following conditions are met:
11
13
  #
12
- # * Redistributions of source code must retain the above copyright
13
- # notice, this list of conditions and the following disclaimer.
14
+ # * Redistributions of source code must retain the above copyright
15
+ # notice, this list of conditions and the following disclaimer.
14
16
  #
15
- # * Redistributions in binary form must reproduce the above copyright
16
- # notice, this list of conditions and the following disclaimer in the
17
- # documentation and/or other materials provided with the distribution.
17
+ # * Redistributions in binary form must reproduce the above copyright
18
+ # notice, this list of conditions and the following disclaimer in the
19
+ # documentation and/or other materials provided with the distribution.
18
20
  #
19
- # * Neither the name of Christopher Mark Gore nor the names of other
20
- # contributors may be used to endorse or promote products derived from
21
- # this software without specific prior written permission.
21
+ # * Neither the name of Christopher Mark Gore nor the names of other
22
+ # contributors may be used to endorse or promote products derived from
23
+ # this software without specific prior written permission.
22
24
  #
23
25
  # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24
26
  # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: btce
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,13 +12,14 @@ authors:
12
12
  - Stephan Kaag
13
13
  - Sami Laine
14
14
  - Selvam Palanimalai
15
+ - Kevin Pheasey
15
16
  - Jaime Quint
16
17
  - Panupan Sriautharawong
17
18
  - Michaël Witrant
18
19
  autorequire:
19
20
  bindir: bin
20
21
  cert_chain: []
21
- date: 2014-02-09 00:00:00.000000000 Z
22
+ date: 2014-02-17 00:00:00.000000000 Z
22
23
  dependencies:
23
24
  - !ruby/object:Gem::Dependency
24
25
  name: monkey-patch
@@ -78,3 +79,4 @@ signing_key:
78
79
  specification_version: 3
79
80
  summary: A simple library to interface with the API for btc-e.com in Ruby.
80
81
  test_files: []
82
+ has_rdoc: