Skip to content

Commit 3e92702

Browse files
Remove deprecated generators (Faker::Twitter and Faker::BossaNova) (#3190)
* Remove deprecated Faker::Twitter Please use Faker::X from now on. And note that the generator has been updated to match the new API response. * Remove deprecated Faker::BossaNova Please use Faker::Music::BossaNova. * Rename files referencing twitter to X
1 parent 22e8d22 commit 3e92702

File tree

7 files changed

+247
-573
lines changed

7 files changed

+247
-573
lines changed

doc/default/x.md

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
`Faker::Twitter` has been deprecated in favor of `Faker::X`. While it's still maintained, its docs can be found at [Faker::Twitter](#fakertwitter).
2-
31
# Faker::X
42

53
Generates approximate X (previously Twitter) user and tweet objects, based on X's API v2 responses.
@@ -58,9 +56,9 @@ Produces a random X tweet with default attributes. Available extensions can be r
5856

5957
```ruby
6058
# Keyword arguments: include_user, include_media
61-
Faker::Twitter.tweet #=> { data: [{:id=>"8821452687517076614", :text=>"Ea et laboriosam vel non.",...
62-
Faker::Twitter.tweet(include_user: true) # Includes user attributes
63-
Faker::Twitter.tweet(include_media: true) # Includes media (photo) attributes
59+
Faker::X.tweet #=> { data: [{:id=>"8821452687517076614", :text=>"Ea et laboriosam vel non.",...
60+
Faker::X.tweet(include_user: true) # Includes user attributes
61+
Faker::X.tweet(include_media: true) # Includes media (photo) attributes
6462
```
6563

6664
Example outputs:
@@ -194,35 +192,3 @@ Produces a random screen_name:
194192
```ruby
195193
Faker::X.screen_name #=> "audreanne_hackett"
196194
```
197-
198-
# Faker::Twitter
199-
200-
This generator has been deprecated. Please use `Faker::X` instead. Note that some attributes have been deprecated by [X's API](https://docs.x.com/x-api/migrate/data-format-migration).
201-
202-
Available since version 1.7.3.
203-
204-
Generate realistic Twitter user and status objects similar to what you would get back from the API.
205-
206-
```json
207-
{
208-
"created_at": "Mon Dec 10 00:00:00 +0000 2012",
209-
"id": 8821452687517076614,
210-
"id_str": "8821452687517076614",
211-
"text": "Ea et laboriosam vel non.",
212-
// ...
213-
}
214-
```
215-
216-
```ruby
217-
# Keyword arguments: include_status, include_email
218-
Faker::Twitter.user #=> {:id=>8821452687517076614, :name=>"Lincoln Paucek", :screen_name=>"cody"...
219-
Faker::Twitter.user(include_status: false) # Just get a user object with no embed status
220-
Faker::Twitter.user(include_email: true) # Simulate an authenticated user with the email permission
221-
222-
# Keyword arguments: include_user, include_photo
223-
Faker::Twitter.status #=> {:id=>8821452687517076614, :text=>"Ea et laboriosam vel non."...
224-
Faker::Twitter.status(include_user: false) # Just get a status object with no embed user
225-
Faker::Twitter.status(include_photo: true) # Includes entities for an attached image
226-
227-
Faker::Twitter.screen_name #=> "audreanne_hackett"
228-
```

0 commit comments

Comments
 (0)