posit-dev / posit-dev/connectapi

Rename all instances of the Connect class in arguments to `client`

Open
#467 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
54
Forks
27
Avg merge
1d 3m
Merged PRs (30d)
1

Description

Throughout the package, arguments and objects denoting the Connect client use different names.

src
https://github.com/posit-dev/connectapi/blob/2522605de615603f9b26824594f9d0b973003483/R/get.R#L218-L225

connect
https://github.com/posit-dev/connectapi/blob/860052e414a278b236df02affdd728d040f30a44/R/content.R#L593

client is used elsewhere.

con is also used as a variable name internally, but this can be confusing if it occurs in contexts when content is also an object.

We should pick a single name, especially for user-facing arguments. I think client is better than src.

To maintain backward compatibility with existing code, we could look for the old name in ... if the first arg is missing.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked examples in R/get.R around lines 218-225 and R/content.R around line 593, then search the package for src, connect, client, and con used for the Connect client. Review how user-facing arguments and ... are handled before standardizing the names; done means the relevant arguments consistently use client while preserving the intended backward compatibility.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
api
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.