wp-api 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 24107fb97de7c7e955a96022492ac049a5c5b424
4
- data.tar.gz: 8693d0c868cc4bd0b92a20b57f99cdff665fc38d
3
+ metadata.gz: 9193dd33f9bcafef0988ac30e3db1e6602963ce6
4
+ data.tar.gz: 3a87c0d792c37e040e87314af9ae727b52709df3
5
5
  SHA512:
6
- metadata.gz: 437f01e8194026b1a2dd599b3106ce3e572b34881beb9bd441f3bfb8e43663580253acacef6e8852b9c5e1e959a0d2a664a40ab093bcaaae254a46092846497a
7
- data.tar.gz: 0ae505405a2bec384e2aef714c945c0c9cea89fcde8db674bd0e8aac117867515fdc2f1a98cadbd645a7ab8054145a8b6fbb926e473cdf750157b7c611ebcdb9
6
+ metadata.gz: 83166ac0a474b0fb258b4ca799249acfe4078830f92fe8c5476375281f573eddd6c21cab4ef7a8f59fe5c35eb8a3fc44efaa5f2adb42da88c31f06e6bc2f395d
7
+ data.tar.gz: 325aa081fe6b7f479ce202263078e9421840b7d7413516eba2a1433d15ab5977fee9073dd6c0d42ac44fa3e348919fbb56ac535d6ff56b7936e64267f59975dc
@@ -29,6 +29,14 @@ module WP::API
29
29
  resource_named('pages', slug)
30
30
  end
31
31
 
32
+ def item_named(slug)
33
+ begin
34
+ item = resource_named('posts', slug)
35
+ rescue WP::API::ResourceNotFoundError
36
+ item = resource_named('pages', slug)
37
+ end
38
+ end
39
+
32
40
  private
33
41
 
34
42
  def resources(res, query = {})
@@ -1,5 +1,5 @@
1
1
  module WP
2
2
  module API
3
- VERSION = "0.1.5"
3
+ VERSION = "0.1.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wp-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Colin Young
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-07 00:00:00.000000000 Z
11
+ date: 2014-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty