> For the complete documentation index, see [llms.txt](/llms.txt)

# GS2-Friend トランザクションアクション

検証/消費/入手の各トランザクションアクションの仕様






## Acquire Action

入手アクション

### Gs2Friend:UpdateProfileByUserId

ユーザーIDを指定してプロフィールを更新<br>

指定されたユーザーのプロフィールを3つの異なる公開レベルで更新します（サーバーサイド操作）：<br>
- publicProfile: すべてのユーザーに公開<br>
- followerProfile: フォロワーにのみ公開<br>
- friendProfile: フレンドにのみ公開

**数量指定可能なアクション：いいえ**

**反転可能なアクション：いいえ**

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| userId | string |  | ✓|  |  ~ 128文字 | ユーザーID<br>`#{userId}` と設定することでログイン中のユーザーIDに置換されます。 |
| publicProfile | string |  | |  |  ~ 1024文字 | 公開されるプロフィール<br>関係性に関わらずすべてのプレイヤーに表示されるプロフィール情報です。通常、表示名、アバター、その他公開可能な情報に使用されます。 |
| followerProfile | string |  | |  |  ~ 1024文字 | フォロワー向けに公開されるプロフィール<br>このユーザーをフォローしているプレイヤーにのみ表示されるプロフィール情報です。公開プロフィールよりも詳細な情報（ゲームプレイ統計やステータスメッセージなど）を含むことができます。 |
| friendProfile | string |  | |  |  ~ 1024文字 | フレンド向けに公開されるプロフィール<br>相互フレンド関係が成立しているプレイヤーにのみ表示されるプロフィール情報です。最もプライベートなプロフィールレベルで、連絡先やプライベートメッセージなどの個人情報の共有に適しています。 |
| timeOffsetToken | string |  | |  |  ~ 1024文字 | タイムオフセットトークン |




**JSON**
```json
{
    "action": "Gs2Friend:UpdateProfileByUserId",
    "request": {
        "namespaceName": "[string]ネームスペース名",
        "userId": "[string]ユーザーID",
        "publicProfile": "[string]公開されるプロフィール",
        "followerProfile": "[string]フォロワー向けに公開されるプロフィール",
        "friendProfile": "[string]フレンド向けに公開されるプロフィール",
        "timeOffsetToken": "[string]タイムオフセットトークン"
    }
}
```

**YAML**
```yaml

action: Gs2Friend:UpdateProfileByUserId
request:
  namespaceName: "[string]ネームスペース名"
  userId: "[string]ユーザーID"
  publicProfile: "[string]公開されるプロフィール"
  followerProfile: "[string]フォロワー向けに公開されるプロフィール"
  friendProfile: "[string]フレンド向けに公開されるプロフィール"
  timeOffsetToken: "[string]タイムオフセットトークン"
```

**GS2-Script**
```lua

transaction.service("friend").acquire.update_profile_by_user_id({
    namespaceName="[string]ネームスペース名",
    userId="[string]ユーザーID",
    publicProfile="[string]公開されるプロフィール",
    followerProfile="[string]フォロワー向けに公開されるプロフィール",
    friendProfile="[string]フレンド向けに公開されるプロフィール",
    timeOffsetToken="[string]タイムオフセットトークン",
})
```


---



