• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jreleaser / jreleaser / #544

28 Oct 2025 03:56PM UTC coverage: 48.245% (-0.03%) from 48.273%
#544

push

github

web-flow
feat(announce): Add Reddit announcer support

Fixes #1457

188 of 414 new or added lines in 16 files covered. (45.41%)

6 existing lines in 2 files now uncovered.

26009 of 53910 relevant lines covered (48.25%)

0.48 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

33.33
/sdks/jreleaser-reddit-java-sdk/src/main/java/org/jreleaser/sdk/reddit/api/SubmissionRequest.java
1
/*
2
 * SPDX-License-Identifier: Apache-2.0
3
 *
4
 * Copyright 2020-2025 The JReleaser authors.
5
 *
6
 * Licensed under the Apache License, Version 2.0 (the "License");
7
 * you may not use this file except in compliance with the License.
8
 * You may obtain a copy of the License at
9
 *
10
 *     https://www.apache.org/licenses/LICENSE-2.0
11
 *
12
 * Unless required by applicable law or agreed to in writing, software
13
 * distributed under the License is distributed on an "AS IS" BASIS,
14
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
 * See the License for the specific language governing permissions and
16
 * limitations under the License.
17
 */
18
package org.jreleaser.sdk.reddit.api;
19

20
import feign.form.FormProperty;
21

22
/**
23
 * @author Usman Shaikh
24
 * @since 1.21.0
25
 */
26
public class SubmissionRequest {
27
    @FormProperty("api_type")
28
    private String apiType;
29
    
30
    private String kind;
31
    
32
    @FormProperty("sr")
33
    private String subreddit;
34
    
35
    private String title;
36

37
    private String text;
38
    
39
    private String url;
40

NEW
41
    public SubmissionRequest() {
×
NEW
42
    }
×
43

44
    public SubmissionRequest(String apiType, String kind, String subreddit, String title, String text, String url) {
1✔
45
        this.apiType = apiType;
1✔
46
        this.kind = kind;
1✔
47
        this.subreddit = subreddit;
1✔
48
        this.title = title;
1✔
49
        this.text = text;
1✔
50
        this.url = url;
1✔
51
    }
1✔
52

53
    public String getApiType() {
NEW
54
        return apiType;
×
55
    }
56

57
    public void setApiType(String apiType) {
NEW
58
        this.apiType = apiType;
×
NEW
59
    }
×
60

61
    public String getKind() {
NEW
62
        return kind;
×
63
    }
64

65
    public void setKind(String kind) {
NEW
66
        this.kind = kind;
×
NEW
67
    }
×
68

69
    public String getSubreddit() {
NEW
70
        return subreddit;
×
71
    }
72

73
    public void setSubreddit(String subreddit) {
NEW
74
        this.subreddit = subreddit;
×
NEW
75
    }
×
76

77
    public String getTitle() {
NEW
78
        return title;
×
79
    }
80

81
    public void setTitle(String title) {
NEW
82
        this.title = title;
×
NEW
83
    }
×
84

85
    public String getText() {
NEW
86
        return text;
×
87
    }
88

89
    public void setText(String text) {
NEW
90
        this.text = text;
×
NEW
91
    }
×
92

93
    public String getUrl() {
NEW
94
        return url;
×
95
    }
96

97
    public void setUrl(String url) {
NEW
98
        this.url = url;
×
NEW
99
    }
×
100

101
    public static SubmissionRequest forTextPost(String subreddit, String title, String text) {
102
        return new SubmissionRequest("json", "self", subreddit, title, text, null);
1✔
103
    }
104

105
    public static SubmissionRequest forLinkPost(String subreddit, String title, String url) {
106
        return new SubmissionRequest("json", "link", subreddit, title, null, url);
1✔
107
    }
108
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc