Class: Medium::Posts
- Inherits:
- 
      Object
      
        - Object
- Medium::Posts
 
- Defined in:
- lib/medium/posts.rb
Instance Method Summary collapse
- 
  
    
      #create(opts)  ⇒ Hash 
    
    
  
  
  
  
  
  
  
  
  
    Creates a post on the authenticated user’s profile. 
- 
  
    
      #initialize(client)  ⇒ Posts 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Posts. 
Constructor Details
#initialize(client) ⇒ Posts
Returns a new instance of Posts.
| 3 4 5 | # File 'lib/medium/posts.rb', line 3 def initialize(client) @client = client end | 
Instance Method Details
#create(opts) ⇒ Hash
Creates a post on the authenticated user’s profile.
| 33 34 35 36 | # File 'lib/medium/posts.rb', line 33 def create(opts) @client.post "users/#{@client.users.me['data']['id']}/posts", build_request_with(opts) end |