Creates board belonging to current user.

 `POST /api/boards`
494748
def create
      @user_board = UserBoard.new(
        name: params[:board][:name],
        user_id: @user.id,
        encrypted_password: params[:encrypted_password],
        is_admin: true
      )
      if @user_board.save
        render json: @user_board, status: :created
      else
        render json: @user_board.errors.full_messages, status: 422
      end

    end
931611
def create(username, groups = '', opts = {})
      payload = {
        :account => {
          :username => username,
          :comment  => '',
          :groups   => groups,
          :password => password_opts.merge(opts.fetch(:password, {}))
        }
      }
      @server.commands.get(post(payload)['command']['id'])
    end
364708
def board_links_to_ids(self):
        
        resp = self.stats.session.open(
            "{0}/members/{1}/boards?{2}".format(
                self.stats.url, self.username, urllib.urlencode({
                    "key": self.key,
                    "token": self.token,
                    "fields": "shortLink"})))
        boards = json.loads(resp.read())

        return [board['id'] for board in boards if self.board_links == [""]
                or board['shortLink'] in self.board_links]
526653
def create(user_name, repo_name, issue_id, params={})
      _update_user_repo_params(user_name, repo_name)
      _validate_user_repo_params(user, repo) unless user? && repo?
      _validate_presence_of issue_id

      normalize! params
      # _merge_mime_type(:issue_comment, params)
      filter! VALID_ISSUE_COMMENT_PARAM_NAME, params
      assert_required_keys(%w[ content ], params)

      post_request("/1.0/repositories/#{user}/#{repo.downcase}/issues/#{issue_id}/comments/", params)
    end
883611
function getBoards(paginate, callback) {
        var boardsResponse;

        // Check for cache existence
        getCache('boards_' + username, true, function (cacheData) {
            if (cacheData === null) {
                // Create get request and put it in the cache
                get('http://pinterestapi.co.uk/' + username + '/boards', true, function (response) {
                    putCache('boards_' + username, JSON.stringify(response));

                    if (paginate) {
                        boardsResponse = buildResponse(response.body ? response.body : []);
                    } else {
                        boardsResponse = response.body ? response.body : [];
                    }
                    callback(boardsResponse);
                    return;
                });
            } else {
                if (paginate) {
                    boardsResponse = buildResponse(cacheData.body ? cacheData.body : []);
                } else {
                    boardsResponse = cacheData.body ? cacheData.body : [];
                }
                callback(boardsResponse);
                return;
            }
        });
    }
790714
def post(method, hmc, uri, uri_parms, body, logon_required,
             wait_for_completion):
        """"""
        assert wait_for_completion is True  # synchronous operation
        user_role_oid = uri_parms[0]
        user_role_uri = '/api/user-roles/' + user_role_oid
        try:
            user_role = hmc.lookup_by_uri(user_role_uri)
        except KeyError:
            raise InvalidResourceError(method, uri)
        check_required_fields(method, uri, body,
                              ['permitted-object', 'permitted-object-type'])
        # Reject if User Role is system-defined:
        if user_role.properties['type'] == 'system-defined':
            raise BadRequestError(
                method, uri, reason=314, message="Cannot add permission to "
                "system-defined user role: {}".format(user_role_uri))
        # Apply defaults, so our internally stored copy has all fields:
        permission = copy.deepcopy(body)
        if 'include-members' not in permission:
            permission['include-members'] = False
        if 'view-only-mode' not in permission:
            permission['view-only-mode'] = True
        # Add the permission to its store (the faked User Role object):
        if user_role.properties.get('permissions', None) is None:
            user_role.properties['permissions'] = []
        user_role.properties['permissions'].append(permission)
1214796
def post_api url, params
        uri = URI.parse(url)
        http = Net::HTTP.new(uri.host, uri.port)
        http.use_ssl = self.secure
        form_params = params.to_query
        res = http.post(uri.request_uri, form_params)
        res.body
      end
615170
def install_boards(boardfamily)
      # TODO: find out why IO.pipe fails but File::NULL succeeds :(
      result = run_and_capture(flag_install_boards, boardfamily)
      already_installed = result[:err].include?("Platform is already installed!")
      result[:success] || already_installed
    end
973259
def update_current_user(self, **params):
        """"""
        response = self._put('v2', 'user', data=params)
        return self._make_api_object(response, CurrentUser)
1368317
def move_to_board(new_board, new_list = nil)
      unless board_id == new_board.id
        payload = { value: new_board.id }
        payload[:idList] = new_list.id if new_list
        client.put("/cards/#{id}/idBoard", payload)
      end
    end
1111885
function create(req, res, next) {
  var body = req.body;
  body.user_id = req.session.user.id;

  db.posts.create(req.body, function(err, post) {
    if(err) { return next(err); }

    res.json(201, post);
    signals.emit('post:create', post);
  });
}
1345728
def post(self, request, *args, **kwargs):
        """"""
        kwargs['pk'] = request.user.id
        self.kwargs['pk'] = request.user.id
        return super().post(request, *args, **kwargs)
1204505
def create
      user = User.new(user_params)

      if user.save
        UserMailer.confirm_account(user).deliver_now
        render json: user, status: :created
      else
        render json: user.errors, status: 422
      end
    end
1136887
def create(**params)
      path = nest_path_within_parent(plural_resource_path, params)
      api_request(:post, path, params: params)
    end
138829
def has_post_access(board_id, post_id)
      post = Unsakini::Post.where(id: post_id, board_id: board_id)
      .joins("LEFT JOIN #{UserBoard.table_name} ON #{UserBoard.table_name}.board_id = #{Post.table_name}.board_id")
      .where("#{UserBoard.table_name}.user_id = ?", @user.id)
      .first
      if post.nil?
        return {status: :forbidden}
      else
        return {status: :ok, post: post}
      end
    end
1018789
def post(self, resource, data=None, json=None):
        
        return self.do(resource, 'POST', data=data, json=json)
1023652
def user_organization_membership_create(self, user_id, data, **kwargs):
        ""
        api_path = "/api/v2/users/{user_id}/organization_memberships.json"
        api_path = api_path.format(user_id=user_id)
        return self.call(api_path, method="POST", data=data, **kwargs)