torn-client 0.2.6 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -65,7 +65,7 @@ const client = new TornAPI({
65
65
  // Example: Fetch a user's profile using a context method
66
66
  async function getUserProfile() {
67
67
  try {
68
- const user = await client.user.withId(1).get();
68
+ const user = await client.user.withId(1).profile();
69
69
  console.log(user.name, user.level, user.gender);
70
70
  } catch (error) {
71
71
  console.error('Failed to fetch user profile:', error);
@@ -91,7 +91,7 @@ const factionHof = await client.torn.factionhof({ cat: 'respect' });
91
91
  const userContext = client.user.withId(1);
92
92
 
93
93
  // Fetch multiple details for the same user without repeating the ID
94
- const profile = await userContext.get();
94
+ const profile = await userContext.profile();
95
95
  const personalStats = await userContext.personalstats({ cat: 'all' });
96
96
  const properties = await userContext.properties();
97
97
  ```