Like a given post
@param postId the ID of the post to like
@param reblogKey The reblog key for the post
772589
public void like(Long postId, String reblogKey) {
        Map<String, String> map = new HashMap<String, String>();
        map.put("id", postId.toString());
        map.put("reblog_key", reblogKey);
        requestBuilder.post("/user/like", map);
    }
1329571
public void accessRestriction_sms_id_enable_POST(Long id, String code) throws IOException {
		String qPath = "/me/accessRestriction/sms/{id}/enable";
		StringBuilder sb = path(qPath, id);
		HashMap<String, Object>o = new HashMap<String, Object>();
		addBody(o, "code", code);
		exec(qPath, "POST", sb.toString(), o);
	}
1046953
public function like($userId=null)
	{
		if(is_null($userId)) {
			$userId = $this->loggedInUserId();
		}
		
		if($userId) {
			$like = $this->likes()
				->where('user_id', '=', $userId)
				->first();
	
			if($like) return;
	
			$like = new Like();
			$like->user_id = $userId;
			$this->likes()->save($like);
		}

		$this->incrementLikeCount();
	}
493379
public Post reblog(String blogName, Map<String, ?> options) {
        return client.postReblog(blogName, id, reblog_key, options);
    }
1287433
public final void postAggLabel(PostAggItem postAggItem) throws RecognitionException {
		Token id=null;

		try {
			// druidG.g:550:2: ( ( AS WS id= ID ) )
			// druidG.g:550:4: ( AS WS id= ID )
			{
			// druidG.g:550:4: ( AS WS id= ID )
			// druidG.g:550:5: AS WS id= ID
			{
			match(input,AS,FOLLOW_AS_in_postAggLabel3584); 
			match(input,WS,FOLLOW_WS_in_postAggLabel3586); 
			id=(Token)match(input,ID,FOLLOW_ID_in_postAggLabel3590); 
			}

			postAggItem.name = (id!=null?id.getText():null);
			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
	}
977414
function postSetTags(post_id, tags, cb) {
  var ids = _.pluck(tags, 'id')
    , q1 = 'DELETE FROM posts_tags WHERE post_id = $1'
    , q2 = 'INSERT INTO posts_tags (post_id, tag_id) VALUES ' +
    ids.map(function(id) {
      return '(' + post_id + ',' + id + ')';
    }).join(', ');

  db.getClient(function(err, client, done) {
    client.query(q1, [post_id], function(err, r) {
      if(err) { return cb(err); }
      client.query(q2, function(err, r) {
        if(err) {
          cb(err);
          done(err);
        } else {
          cb(null, r.rowCount);
          done();
        }
      });
    });
  });
}
1252927
def status_reblogged_by(self, id):
        
        id = self.__unpack_id(id)
        url = '/api/v1/statuses/{0}/reblogged_by'.format(str(id))
        return self.__api_request('GET', url)
1057952
private void postLog(RequestDTO request, byte[] reqBytes, byte[] resBytes, long start) {
        LOG.info(String.format("Navi rpc call end - %d\t%s\t%s\t%s\t%d\t%d\t%d", request
                .getTraceId(), url, request.getMethod(), serializeHandler.getProtocol().getName(),
                reqBytes == null ? 0 : reqBytes.length, resBytes == null ? 0 : resBytes.length,
                (System.currentTimeMillis() - start)));
    }
1168397
def like(self):
        
        self.requester.post(
            '/{endpoint}/{id}/like',
            endpoint=self.endpoint, id=self.id
        )
        return self
584778
public function update($post_id, string $key, $value, $where = '')
    {
        $post_id = (int) ($post_id ?? get_the_ID());

        if (!$post_id || !$key) {
            return; // Not possible.
        }
        update_post_meta($post_id, $this->key($key), $value, $where);
    }
1329953
public function get( $key, $post_id = null, $single = true, $default = '' ) {
		if ( ! isset( $post_id ) ) {
			$post_id = $this->get_post_id( true );
		}
		if ( $post_id <= 0 ) {
			return $this->apply_filters( 'get_post_meta', $default, $key, $post_id, $single, $default );
		}

		return $this->apply_filters( 'get_post_meta', get_post_meta( $post_id, $this->get_meta_key( $key ), $single ), $key, $post_id, $single, $default, $this->get_post_prefix() );
	}
1156306
def query_by_postid(postid, limit=5):
        '''
        
        '''
        recs = TabPostHist.select().where(
            TabPostHist.post_id == postid
        ).order_by(
            TabPostHist.time_update.desc()
        ).limit(limit)
        return recs
1345310
public function getPostMetaQuery($postId, $metaName)
    {
        return $this->createQueryBuilder('m')
            ->innerJoin('m.post', 'p')
            ->where('m.key = :metaName')
            ->andWhere('p.id = :postId')
            ->setParameter('postId', $postId)
            ->setParameter('metaName', $metaName)
            ->getQuery();
    }
195280
func ReblogPost(client ClientInterface, blogName string, postId uint64, reblogKey string, params url.Values) (*PostRef, error) {
	if reblogKey == "" {
		return nil, errors.New("No reblog key provided")
	}
	params.Set("reblog_key", reblogKey)
	return doPost(client, "/blog/%s/post/reblog", blogName, setPostId(postId, params))
}
493305
public Meta selectPostMetaValue(final long postId, final String metaKey) throws SQLException {
      Connection conn = null;
      PreparedStatement stmt = null;
      ResultSet rs = null;
      Timer.Context ctx = metrics.selectPostMetaTimer.time();

      try {
         conn = connectionSupplier.getConnection();
         stmt = conn.prepareStatement(selectPostMetaValueSQL);
         stmt.setLong(1, postId);
         stmt.setString(2, metaKey);
         rs = stmt.executeQuery();
         return rs.next() ? new Meta(rs.getLong(1), rs.getString(2), rs.getString(3)) : null;
      } finally {
         ctx.stop();
         SQLUtil.closeQuietly(conn, stmt, rs);
      }
   }
973300
public Post postReblog(String blogName, Long postId, String reblogKey, Map<String, ?> options) {
        if (options == null) {
            options = new HashMap<String, String>();
        }
        Map<String, Object> soptions = JumblrClient.safeOptionMap(options);
        soptions.put("id", postId.toString());
        soptions.put("reblog_key", reblogKey);
        final Long reblogId = requestBuilder.post(JumblrClient.blogPath(blogName, "/post/reblog"), soptions).getId();
        return this.blogPost(blogName, reblogId);
    }
633458
public void touchPost(final long postId, final TimeZone tz) throws SQLException {
      if(postId < 1L) {
         throw new SQLException("The post id must be specified for update");
      }

      long modifiedTimestamp = System.currentTimeMillis();

      int offset = tz.getOffset(modifiedTimestamp);
      Connection conn = null;
      PreparedStatement stmt = null;
      Timer.Context ctx = metrics.updatePostTimer.time();
      try {
         conn = connectionSupplier.getConnection();
         stmt = conn.prepareStatement(updatePostModifiedSQL);
         stmt.setTimestamp(1, new Timestamp(modifiedTimestamp));
         stmt.setTimestamp(2, new Timestamp(modifiedTimestamp - offset));
         stmt.setLong(3, postId);
         stmt.executeUpdate();
      } finally {
         ctx.stop();
         SQLUtil.closeQuietly(conn, stmt);
      }
   }